Since the distance travelled on both sides is the same, we can use the formula of harmonic mean of speeds
Average Speed: 2xy/(x+y) where, x is the speed while going from A to B and y is the speed while coming back.
So using this formula, we get the answer as 48 kmph.