Reading between the lines, she had her visa cancelled previously. She then seems to have flown from Canada to Mexico and applied at the border and I'm guessing this bit but probably filled the form wrong like not saying about the cancelled visa. Then the mucked up bit is rather than just refused entry she was put down for deportation but Mexico doesn't take non Mexican deportees so she ended up in the nasty holding system for illegal immigrants there. The US banned her from entering for five years so I think there must have been an error/deception on the application.
I guess the answer if you are Canadian is sort it out at the embassy or if you are chancing things do it at the Canada/US border not the Mexican one.