Moving downstream (with the current), the boat moves at a rate of (252 mi)/(12 h) = 21 mph. Upstream (against the current), it moves at a rate of (252 mi)/(84 h) = 3 mph.
When traveling downstream, the boat's speed is the sum of its own speed in still water and the speed of the current. It's the same going upstream, but the boat and current move in opposite directions. Let b and c denote these speeds, respectively. Then
downstream: b + c = 21 mph
upstream: b - c = 3 mph
Adding these equations eliminates c and lets us solve for b :
(b + c) + (b - c) = 21 mph + 3 mph
2b = 24 mph
b = 12 mph
Now solve for c :
12 mph + c = 21 mph
c = 9 mph