Let x mi/h be the speed of the boat in still water and y mi/h be the speed of stream.
1) Downstream.
The speed of the boat travelling downstream is x+y mi/h. Then

2) Upstream.
The speed of the boat travelling upstream is x-y mi/h. Then

3) Solve the system of equations:

Add these two equations:

Subtract these two equations:

Answer: the speed of the boat in still water is 21 miles per hour and the speed of the stream is 7 miles per hour.