.
Walking at the speed of 4 km/h, the man spends 1.5 hours to cover 6 kilometers.
For the way back, moving at the speed of 12 km/h, he spends 0.5 of an hour.
In all, he spends 1.5 hours + 0.5 of an hour = 2 hours to cover 6 + 6 = 12 kilometers.
It means that his average speed on the way "to there" and back is
= 6 kilometers per hour.
Solved.
--------------------
The lesson to learn from the solution is THIS :
Notice that the average speed in this case "6 km/h" IS NOT the average of the partial speeds 4 km/h and 12 km/h/