If the speed of the river is r and of the boat is b in still water, then upstream against the current the combined speed is b-r and downstream with the current it's b+r.
So 3=(b-r)*4 is the relation between the distance, speed and time for the upstream trip.
9=(b+r)*2 is the relation for the downstream trip.
Therefore 3=4b-4r and 9=2b+2r. Double the latter: 18=4b+4r.
Subtract the first equation from this: 18-3=8r, so r=15/8=1.875mph.
(The boat’s speed can also be found by adding the equations: 8b=21, so b=21/8=2.625mph.)
The speed of the river’s current is 1.875mph.