Let b and s be the velocity of the boat and stream respectively....
3(b-s)=27
b-s=9
b=9+s we will use this in the second equation....
2(b+s)=30
b+s=15, now use b found above in this to get:
9+s+s=15
2s+9=15
2s=6
s=3, and since from earlier b-s=9, b=9+s so
b=12
So the speed of the boat is 12mph and the stream is 3 mph