In the first question about displacement, you had to subtract $$3 \, \mathrm{miles}$$ from $$5 \, \mathrm{miles}$$ to get the net displacement. In the second question, you had to add $$5 \, \mathrm{miles}$$ to $$7 \, \mathrm{miles}$$. This is because, in the first case, the two vectors were in the opposite direction, whereas, in the second case they were in the same direction.