Let the speed of the boat = x kmph.
In down stream in 1 hour boat goes = sp. of the boat + sp of the stream = x+3 km.
In upstream, same distance goes by 1 1/2 hours. So in 1 1/2 it travels = (sp. of the boat - sp. of the stream) x 3/2 = (x-3)3/2 km.