There is no puzzle here and bsabktr has given you the right answer.
In fact you borrowed only 240 each from them which makes a total of 480 and you spent 450 and you have the balance of 30 riyals with you.