The rate going as James calls it is called x mph, the rate returning (why not rate coming, James?) is x - 2 mph. The distance each way was 7 miles. Using the fact that distance = rate multiplied by time, you get
7 = (x) t for going portion, where t is the time taken to go across. You get t = 7/x
We know that the total time to go and return was 3 hrs, so return time must be 3-t hours.
Again use distance = rate multiplied by time for the return
7 = (x-2) (3-t)
Substitute for t from above, t=7/x
7 = (x-2)(3 - 7/x)
7x = (x-2)(3x-7)
3x2 -13x +14 = 7x
3x2 -20x +14 = 0
Solve the quadratic equation and accept the sensible of the two possible roots.