we cant know if you dont show us a graph or something like that.
THE MULTIPLE OF 3 ARE: 3 , 6 , 9 ,12
The 1st magazine costs either 3 or 6 or 9 , 12
The 2nd magazine costs <span>3 or 6 or 9 , 12
The value 12 is to be discarded , then are the sum of tall possibilities to get 12:
</span>mag 1st mag 2nd total
------------ ------------ --------
3 9 12
6 6 12
9 3 12
Distance equals end minus start
(-7,-7)-(5,9)=
(-7-5,-7-9)=(-12,-16)
(-12,-16) gives us the distance point coordinates. Now to find the magnitude we can take sqrt((-12)^2+(-16)^2)=20
So the distance between the two points is 20
I hope this helps