Upvote:1
Yes, that should not be a problem.
Make sure you have a tourism visa or an ESTA if you are a national of a Visa Waiver Program country. Also make sure you have a clear itinerary and a proof of it before crossing the borders, a temporary resident visa for the first USA entry and a plane ticket for the second USA entry should be enough, as the border agent has the job of determining if you are allowed to enter.
Also remember that the maximum stay as a tourist is 90 days (not exactly 3 months), avoid overstaying as it may result in being banned from reentering for some time.
If you are a VWP national, the "90 days North America counter" rule is not supposed to apply because you will be a resident of Canada. However, as @cpast mentions in a comment, the US embassy in Canberra recommends a tourist visa (B1/B2 Business/Tourism) for trips to the USA as a temporary Canadian resident (e.g. on a Work Holiday visa or student permit).