This will be tight. You might be able to avoid CBSA (Canada border control) and head straight to US security and CBP based on your second boarding pass, which would save some time, but there can be big lines for both of these depending on the time of day.