I will assume that when the driver "hits the breaks" the force $F$ that is acting on the car is constant. In that case, the work $W$ that force $F$ does is equal to
$$
W_i = - F d_i \ ,
$$
where $d_i$ is the distance needed for the car to stop, when the car was initially travelling at a speed $v_i$. The negative sign is to recall us that the car is stopping.
The change (final-initial) in the kinetic energy $T_i$ is given by
$$
\Delta T_i = 0 - \frac{1}{2} m v_i^2 \ .
$$
Due to conservation of energy, we know that the kinetic energy loss is equal to the work of friction, i.e.
$$
W_i = \Delta T_i
$$
One way to solve the problem is to compute the quotient between the two cases in the question (a):
$$
\frac{W_2}{W_1} = \frac{\Delta T_2}{\Delta T_2}
$$
Replacing with the respective expressions we get
$$
\frac{-F d_2}{-F d_1} = \frac{-\frac{1}{2} m v_2^2}{-\frac{1}{2} m v_1^2}
$$
Simplifying the quotients gives:
$$
\frac{d_2}{d_1} = \frac{v_2^2}{v_1^2}
$$
Using this last expression will allow us to get the answer to the question.
(a)
The quotient makes sense because the variation of the kinetic energy is equal to the work done by friction both in case 1 and in case 2.
This means that, in practice, we are dividing both sides of the equation by the same number. For instance, if $x=y$, then $x/2 = y/2$; moreover, if $x=y$ and $a=b \neq 0$, then we have that $x/a = y/a \iff x/a = y/b$.
Another, perhaps more complicated way to see that the quotient makes sense is the following:
$$
W_i = \Delta T_i
\iff
\frac{W_i}{\Delta T_i} = 1 \ .
$$
Hence,
$$
\frac{W_2}{\Delta T_2} = 1
\text{ and }
\frac{W_1}{\Delta T_1} = 1 \ .
$$
Therefore,
$$
\frac{W_2}{\Delta T_2} = \frac{W_1}{\Delta T_1}
\iff
\frac{W_2}{W_1} = \frac{\Delta T_2}{\Delta T_1} \ .
$$