Answer
Delivery time: $3$ hours
Return time: $4$ hours
Work Step by Step
The distance, $d$, travelled by the truck for a speed $r$ and time $t$ is $$d= r\times t.$$ While delivering freight, let's say it took $t_{1}$ hours, then the distance will be $$d= 60\times t_{1}.\tag{1}$$ While returning, it took $7-t_{1}$ hours for the same distance. Then $d$ will be $$d= 45\times (7-t_{1}).\tag{2}$$ Equating $(1)$ and $(2)$, since the distance travelled is the same for delivering and returning, we have $$60\times t_{1} = 45\times (7-t_{1}).\tag{3}$$ We solve equation $(3)$:
First we use the distributive property: $$60t_{1}= 315-45t_{1}$$. Add 45$t_{1}$ on both sides $$105t_{1}=315.$$ Divide both sides by $105$ $$t_{1}=3.$$Therefore, $t_{1}$, the time taken for delivery, is $3$ hours, while the returning time is $7-3=4$ hours.