Rearrange the following sentences in coherent order.
1. I thanked the king for his kindness and all the favours he had done to me.
2. The king again gave me many valuable farewell gifts.
3. When it was time to leave, I went to meet the king.
4. Finally, I returned to my city Baghdad as a rich man.
5. Meanwhile, I did good business and earned a lot of money.