One of the stipulations of being granted a visa on arrival in Thailand is that you show proof of leaving the country. Unfortunately, this has to take the form of a confirmed air ticket: thus, travelling overland out of Thailand by train or road does not qualify. Seeing that you live in Guntur, where there is no Thai embassy or visa service, I can understand your temptation to choose the visa-on-arrival route. But you will probably be refused entry at Bangkok airport if you don’t have a confirmed air ticket out. One way to solve this is to simply fly from Bangkok to Siem Reap and onwards.
But here’s the thing: your plan of flying home from Ho Chi Minh City (rather than Bangkok) will prove to be an expensive business. Return tickets from a single point are always cheaper than from multiple ones. The oddest part: even if you fly back from HCMC, you will save nothing in terms of time or money. Assuming that your point of departure in India is Hyderabad, your flight will involve a layover—in Kuala Lumpur, Singapore or, most brief, in Bangkok! Given this, I suggest that you book a return flight to Bangkok. Then, halve the amount of the time you want to spend in Thailand; continue with your overland journey to Siem Reap and onwards to HCMC; fly back to Bangkok; finish up your Thailand agenda; and fly home.
This way, you’ll end up saving considerably. A Hyderabad-Bangkok-Siem Reap-HCMCHyderabad ticket (on multiple airlines) is currently priced at approx. ? 1,20,000. In contrast, the Hyderabad-Bangkok return ticket will cost ? 20,000-25,000 on Thai Airways. Even factoring in your overland travel costs, you will have saved. And solved your visa-on-arrival quandary.