You can put this solution on YOUR website!
let the speed of the motorboat be x kmph
the speed of the current be y kmph = 8 kmph
now,journey with the current:
now considering return journey:
but the distance in both cases must be the same,
Thus speed of the motorboat in still water=40kmph
Hope this helps,