In the last few days, I have travelled from central Bangkok to both airports using public transport. I did not go directly between them. One day, I helped my wife to Suvarnabhumi and the next day I went to Don Muang train station (next to the airport). The BTS system does not go to either airport, you need to change to an airport rail link. This requires a separate ticket. So, you will need 3 tickets and 4 trains (1 change within the BTS system).
I don't think that this could work for you.
In general, I would recommend the trains for getting to either airport. A taxi might occasionally win in a race but it is a big gamble. The trains are more reliable and less stressful.
As others have said, a taxi might work if you are lucky. Google Maps estimates 55 minutes for the drive and it does not go through central Bangkok. The walking within both airports is significant and you cannot afford a single mistake. Do you know your way around both airports?
I would not recommend attempting this. Change one flight by a day. Spend a day in Bangkok; it's a nice place and not very expensive.
I am not sure when trains begin and end. Very early or very late, the taxi is probably preferable. However, during the day (even weekends), I would prefer the trains. I might be biased because I have spent too much of my life in Bangkok traffic jams.