Suppose the distance to and from the bike shop is $x$ miles.
Then the time taken on the journey there is $\frac{x}{3}$ hours, and the time taken on the journey back is $\frac{x}{12}$ hours.
So altogether a distance of $2x$miles is travelled in $\frac{x}{3} + \frac{x}{12} = \frac{5x}{12}$ hours.
So the average speed is $2x \div \frac{5x}{12} = 4.8$ miles per hour.