The formula to find speed:

We first need to find the distance to gift store:
18/60 × 10
=3miles
We can then find the time he used down hill:
3÷30×60
=0.1×60
=6 minutes
In total he walked:
3x2
=6miles
We can then find his average speed by dividing the distance by total time used:
=6÷(6+18)/60
=6÷24/60
=15mph
The answer is 15mph.
Hope it helps!