egypt to petra is pretty straight forward however... if you plan on visiting any other arab countries besides egypt and jordan, you need to consider the israeli visa stigma. ask the israeli border agents to give you a separate transit stamp that doesn't go in your passport.
you'll most likely end up in aqaba where there are a ton of transportation options. i actually went from wadi musa (petra) to aqaba but you can do it in reverse. it cost about $5 for me. getting to wadi rum will be a challenge because there are no public routes to that location so you'll need to spend money. i don't promote or condone hitch hiking anywhere but it's a common form of travel in jordan... something to consider. if you have the cash to spend, just hire a taxi to take you there or if you want, book a tour (not just any kind though).
i can say that petra is one of the most breathtaking places you can visit. it was just awarded status of "world wonder" under the new guidelines. spend at least 2 days there and soak it all in. try to ignore the touts that come from every direction selling rocks and postcards. the people really are very friendly though.