A man travels from A to B at a speed of 30 kmph and returns with a speed of 60 kmph. What is the average speed of the man?

A man travels from A to B at a speed of 30 kmph and returns with a speed of 60 kmph. What is the average speed of the man?

A. 47.5
B. 50
C. 45
D. 40