Answer:
 The the rate of the motorboat in still water is 40 km/h;  the rate of the current is  10 km/h.
Step-by-step explanation:
Let  u  be the rate of the motorboat in still water (in kilometers per hour),
let  v  be the rate of the current.
Then the rate of the motorboat going downstream is  u+v  km/h,
while its rate going upstream is  u-v  km/h.
From the other side, the rate of the motorboat going downstream is  150/3=50km/h = 30 km/h.
Thus you have these two equations
    u + v = 50    (1)   (for the rate downstream),   and
    u - v = 30    (2)   (for the rate upstream).
To solve the system, add equations (1) and (2). You will get
    2u = 50 + 30 = 80;   hence,
     u           = 80/2 = 40 km/h.
Then from the equation (1),  v = 50 - u = 50 - 40 = 10 km/h.
ANSWER.  The the rate of the motorboat in still water is 40 km/h;  the rate of the current is  10 km/h.