Answer
The driver should not attempt to pass.
Work Step by Step
Let $x_c$ be the distance covered by the car (which is initially behind the truck).
$x_c = v_0t + \frac{1}{2}at^2 = (18 ~m/s) ~t + (0.30 ~m/s^2) ~t^2$
Let $x_t$ be the distance covered by the truck.
$x_t = v_0t = (18 ~m/s) ~t$
We need the car to cover 40 meters more than the truck.
$x_c - x_t = (0.30 ~m/s^2)~t^2 = 40 ~m$
$t = \sqrt{\frac{40 ~m}{0.30 ~m/s^2}} = 12 ~s$
We can find $x_c$ when t = 12 seconds.
$x_c = (18 ~m/s)(12 ~s) + (0.30 ~m/s^2)(12 ~s)^2$
$x_c = 259 ~m$
In 12 seconds, the oncoming car covers a distance of:
$(25 ~m/s)(12 s) = 300 ~m$
The total distance covered by the car (initially behind the truck) and the oncoming car is 559 meters. Since there is only a distance of 500 meters between the two cars initially, there is not enough time to make the pass. The car should stay behind the truck.