For interest, I just looked into how much CO2 CN produces annually. I might have got it wrong, but I think it's about 5 million tons a year. That might sound like a lot, but with a $50/ton carbon tax, it's only $250M on a revenue of $15B, and they can pass it on to their customers anyway, and their competitors are trucks, who also have to pay the tax.
It's also less than a percent of Canada's emissions. Eventually, it will have to be reduced or offset, but it is not a priority. CN and CP will figure it out, all the government should do is give them predictable timelines and a level playing ground - carbon pricing.