You're talking about the Sand Dunes in Mui Ne and with 5 days, you can have a great trip in these 2 places.
I think you should spend the 1 first day of your trip in HCMC to get around, enjoy the street food. And then, take an open bus to Mui Ne on early morning the 2nd day. The distance between the 2 places is about 187km and it takes about 5 hours to get to Mui Ne with the fare of $7-10. The famous buslines are Phuong Trang, The SinhTourist.
The 2nd and 3rd day in Mui Ne, you should stay around the beach and enjoy your time of swimming and eating seafood there.
The 4nd day in Mui Ne, go for the Sand Dunes. You should avoid visiting it in the noon, because it's very hot there.
On the 5rd day, you'll come back to Ho Chi Minh city, get around and buy some gifts home.
I wish you a great trip in Vietnam!