A FlyerTalk Posting Legend
Join Date: Sep 2009
Location: Minneapolis: DL DM charter 2.3MM
Programs: A3*Gold, SPG Plat, HyattDiamond, MarriottPP, LHW exAccess, ICI, Raffles Amb, NW PE MM, TWA Gold MM
Posts: 100,368
If OP is Canadian, he/she probably is required to apply for the visa through a Chinese consulate in Canada unless he/she has a USA green card.
Assuming OP has a passport from a country that qualifies for the 144 hour (IIRC currently the case for PEK), I think the only feasible solution would be to rewrite the plane tickets to go through a third country on the way back from China so that TWOV can be used for the itinerary. Assuming that the current ticket has a reasonable change fee, this is probably the cheapest solution too.
Check the big sticky TWOV thread here for details on the exact rules for TWOV.