a man walked for some distance at 8km/h and for an equal distance at 5km/h. the total time he took was 3 hours and 15 minutes. find the total distance he walked.

please help :D

distance=rate*time

rate1*time1=rate2(3 1/4-time1)
solve for time1, then, distance.