Welcome to FT!
You shouldn't have a problem using two tickets for your itinerary.
If you are staying five days in Dubai, check to make sure whether you need a visa to enter the country.
If you are only staying a few hours in DXB and transferring from DL>AI make sure you leave plenty of time between flights so you can complete appropriate formalities.