What is the fastest speed
you can drive and still stop safely at night?
Turn the problem around. Rather than directly finding
an equation for speed as a function of other parameters,
find an equation for stopping distance as a function of
speed.
You then have one equation in one unknown, which can be
solved by elementary means to get speed as a function of
stopping-distance.