This question already has an answer here:
We are dual UK/Canadian citizens with both UK and Canadian passports. We reside in the UK. We will be travelling to the USA and Canada on holiday. Can we: - leave UK on our UK passport and enter USA on Canadian pasport, then - fly out of USA to Canada using our Canada passport - fly back from Canada to UK with "in transit" stop in USA airport, using Canada passport to leave Canada and to get us through the "in transit" bit, and then re-enter UK on UK passport?
Alternative would be to get ESTA forms and to use our UK passports while travelling in USA and "in transit" in the USA