a motorboat can go 24 miles downstream in the same amount of time that it takes to go 12 miles upstream. The boats speed in still water is 12 mph. What is the speed of the river?

mi/hr?

let the speed of the river be x mph

speed up stream = 12-x mph
time to go upstream = 24/)12-x)

speed downstream = 12+x
time to go downstream = 12/(12+x)

but those times are equal, so ...
24/(12-x) = 12/(12+x)
cross-multiply and solve for x