A person goes up the mountain at a speed of 3 kilometers per hour, and returns along the original road at a speed of 6 kilometers per hour when going down the mountain. What is the average speed when going back and forth?
某热以每小时3千米的速度上山、下山时以每小时6千米的速度沿原路返回，往返时的平均速度是多少？
<result>4</result>