I have actually done this trip several times, several ways. The easiest way I have found is this:
Go to the Jordanian Embassy in Tel Aviv to get a tourist visa. Make sure you take a passpor size photo and some a Jordanian Dinars or Israeli Shekles (sorry I don't recall the exact amount). After you get the visa you can then use Allenby/King Hussein Bridge which is close to Jerusalem. This saves the hassle of having to go north to the Jordan River crossing or all the way to Eilat.
Once you arrive in Jordan there will be taxis and busses that can take you to Amman, and from there you can take a bus to Petra but it takes forever. I prefer renting a car at the border and driving. I ususally go up to Amman and jump on King's Highway south to Aqaba and then there are signs to guide you to Petra/Wadi Musa. If you do this, be very careful driving; the road often seems empty and it is tempting to go very fast. However, you never know when a bedouin will suddenly appear and you certainly don't want to hit an animal or God forbid a person. So watch your speed and pay attention!!
On your way back you can again use Allenby crossing and in Israel there are taxis or shayrutim (shared taxis) to Jerusalem. Shayrutim are much cheaper and recommendable.
From Jerusalem, the border crossing is about an hours drive. After you cross the border and rent the car, it will take you approximately three hours to get to Petra. This does not inlclude the time it takes to cross the border, which varies depending on traffic and the mood of the border patrols on both sides. In my experienc it takes anywhere from an hour to three hours. Also, going back to Israel is usually a bit more difficult. If there are tons of people and you have extra cash, the VIP service can be worth in on your way back.
One more thing, it is possible but difficult to drive a private car across the border, and you are not allowed to do this with rental cars.
If you have any other questions, feel free to contact me. Good luck and enjoy your trip!
P.S. I know a couple of great people over there, so if you want information about having a real Petra experience, away from the tourists, let me know and I'll help you out!