let x be speed of the current
let y be speed of the motorboat
so,
5(y - x) = 150
3(y + x) = 150 ------> (x + y) = 150/3
x + y = 50 ------> y = 50 - x
substitute y:
5(50 - x - x) = 150
250 - 10x = 150
250 - 150 = 10x
100 = 10x
x = 10
let's use: 5(y - x) = 150 to solve for y:
5 (y - 10) = 150
5y - 50 = 150
5y = 150 + 50 = 200
5y = 200
y = 40
speed of current is 10 km/hr
speed of motorboat is 40 km/hr