Upvote:1
The standard statement for a visa waiver is that the 90 day clock starts when you enter the US, and remains running until you leave, with visits to Canada. Mexica and the Caribbean not resetting the clock. Applied rigorously this would mean that you would have to finally exit the US 90 days or less from the date you entered the US in transit to Canada. If you are going to do this then you will obviously be OK.
However this is not an absolute rule. It's intended to prevent people making a 'visa run' to get another 90 day period by briefly exiting the US. The actual standard is that "it is only to be used for occasional, short visits to the U.S.". In the case where you transit the US, and then, less than 90 days later, visit the US for another short period (not more than 90 days) it is going to be up to you to convince the immigration officer that your visit will be "short and occasional".
I would expect slightly more scrutiny than you would have without the transit, but as long as you have tickets out, a clear link to your homeland, and no red flags you should be fine. You aren't the first people to have done this.