We did this last fall. ViaRail to Montreal was great. We checked our luggage at Quebec City’s Gare du Palais and saw more of QC, had lunch and caught an afternoon train. We then spent 3 great days in Montreal and flew home from there. As mentioned earlier, you will need to go through customs. If you don’t have global entry, I would suggest that you download the MPC (Mobile Passport Control) app once you arrive at the airport. Load your info and you’ll be able to go through an expedited line at customs.