let
x--------> the speed of the boat in mph
we know that
going upstream the speed is x-7
going downstream the speed is x+7
let the distance be d
time to go upstream = d/(x-7)
time to go downstream = d/(x+7)
time going upstream is 3 times going downstream
so
3d/(x+7) = d/(x-7)
divide by d
3/(x+7) = 1/(x-7)
3x-21 = x+7
2x = 28
x = 14
the answer is
the speed of the boat in still water is 14 mph