A golfer rides in a golf cart at an average speed of 3.10 m/s for 21.0 s. She then gets out of the cart and starts walking at an average speed of 1.60 m/s. For how long (in seconds) must she walk if her average speed for the entire trip, riding and walking, is 2.10 m/s?

I need help solving for T. I don't understand how to do it since there is a T on both sides of the problem

Hmmmm. Are you certain you want to take physics? Here is an example:

a*T+ 19= b*T - 24
subtract b*T from both sides...
a*T-b*T+19=-24
subtract 19 from both sides..
T(a-b)=-24-19
then

T= -43/(a-b)