All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and messenger.
It seems that what you both agreed upon is that you gave him 500 Riyals so that he takes his right from them (the 200 Riyals which he lent to you) and the rest will remain as a trust with him until he pays it back to you. There is nothing wrong with this according to the preponderant opinion and it is not Riba (interest and/or usury).
Al-Hajjaawi said in Al-Iqnaa’: “If a person purchases silver with one dinar and a half, and he gives two dinars to the seller so that he takes his due amount from it, then the dealing is valid even if he took his rights after they have departed from each other. The excess amount is a trust in the seller's hands.”
Also, Mataalib Ulli An-Nuha (a Hanbali book) reads: “The delay occurs in order for each person's right to be separated from that of the other's. The excess amount is a trust in the seller's hand as he has put his hand on it with the permission of its owner.”
Therefore, if this is the case, there is nothing wrong in what you both have done.
For more information on Riba and its types, please refer to Fataawa 44420, 90254, 81152 and 8359.
Allaah Knows best.