Peter and John went shopping and spent money in the ratio 2:3 if peter spent 500 dollars, how much did john spent