There are many testing locations that you can book a test and get the results within 24h, it's considered easy
Elisa, this is a detailed post about the testing procedures and the testing locations in Amman. I suggest you have your hotel tell the driver (taxi, Careem, or Uber) to take you to the nearest drive through testing lab and bring you back (you never get out of the car).
You may need to go twice as it takes a few hours (sometimes more than 4 hours) to receive the PCR results. The second time would be for the rapid test. This is the first I am hearing of a rapid test requirement, especially within 4 hours. You may need to ask the lab about that because ideally you should be at the airport 3 hours before your boarding time which will be cutting it close, especially in traffic unless you have a 2 AM or 4 AM flight.
Thanks both, will check out the link!