That connection sounds a bit tight but doable. You might want to go to a website like Flightaware and look up the arrivals history of the UA flight for the last few weeks to get a sense of whether UA is likely to be on time.
The fastest way from T7 to T2 is to walk directly between the terminals through the parking garage (cut across the horseshoe-shaped terminal layout). Don't wait for the shuttle if you are running short of time.