The good news is, the airport is not too far away from the city center.
I would prefer and feel more comfortable if I arranged my transportation and tour before my arrival in Warsaw
. That way, I could get someone to keep track of my time and bring me to all the places I want to visit, and back in time for my next flight.
You won't have time to explore the Royal Castle, but you can have a quick tour of the Old Town, check out Lazienki Park, have a meal or coffee and head back to the airport.
Check out these 2 options:https://tourguides.viator.com/sightseeing-tours-poland-warsaw-16494.aspxhttps://www.viator.com/tours/Warsaw/Warsaw-Layover-Tour-with-Communist-Car/d528-22434P7