Step 1: Convert given speeds to SI units.
\[
v_{P0} = 36 \times \frac{1000}{3600} = 10~\text{m/s}, v_{Q} = 18 \times \frac{1000}{3600} = 5~\text{m/s}.
\]
So initially: Car P = \(10~\text{m/s}\), Car Q = \(5~\text{m/s}\).
Step 2: Initial relative speed.
Relative speed at \(t=0\):
\[
v_{r0} = v_{P0} - v_Q = 10 - 5 = 5~\text{m/s}.
\]
Step 3: Condition for collision.
Initial separation = \(60~\text{m}\).
Collision occurs in \(t=30~\text{s}\).
Thus the relative displacement closed = \(60~\text{m}\).
Hence, average relative speed is:
\[
v_{r,\text{avg}} = \frac{\Delta x}{t} = \frac{60}{30} = 2~\text{m/s}.
\]
Step 4: Use average of initial and final relative speeds.
For uniformly accelerated (or decelerated) motion:
\[
v_{r,\text{avg}} = \frac{v_{r0} + v_{r,final}}{2}.
\]
Substitute values:
\[
2 = \frac{5 + v_{r,final}}{2}.
\]
\[
v_{r,final} = -1~\text{m/s}.
\]
Step 5: Interpret final relative velocity.
\[
v_{r,final} = v_P' - v_Q = -1.
\]
So,
\[
v_P' - 5 = -1 \Rightarrow v_P' = 4~\text{m/s}.
\]
This is the velocity of car P just before collision.
Final Answer:
\[
\boxed{4~\text{m/s}}
\]