Both are fine. The second implies that washing the car was required to prepare for the departure. The first implies that the car washing was incidental to the departure preparation.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.