Given :
a paddle boat travels upstream = 12 miles
a paddle boat travels downstream = 20 miles
speed of the current = 2 miles per hour
Let the speed of the boat =x
Let the time taken = t
We know the distance for upstream D= (boat speed - current speed) * time
the distance for downstream D= (boat speed + current speed) * time
Plug in all the values and variables in the distance
For upstream 12 = (x-2)t, then

For downstream 20 = (x+2)t then

we got two equations for t, equate it and solve for x

Cross multiply it
12(x+2) = 20(x-2)
12x + 24 = 20x - 40 (subtract 12x and add 40 on both sides)
64 = 8x
x= 8
the speed of the boat in still water = 8 miles per hour