You don’t have a connection, unfortunately. UA is unlikely to check your luggage through, so you’ll have to exit, collect bags, and check in again. Given the possibility losing your BA flight if you don’t present yourself on time, I’d want at least three, better four hours between these flights.