It's theoretically possible but extremely rushed and not recommended. Petra alone deserves a full day with time to explore the Treasury and Monastery. A better option is staying one night in Wadi Rum for a desert experience before heading back through Petra on your return.
Log in to comment and vote.