Suppose that there is a narrow bridge 4 metres wide that only 1 bus can pass on it. The bus is travelling at 10m/s and it is moving with constant speed. A man is 2m away from the bus and is crossing the bridge in a hurry. If the man is walking at 1.5m/s, what will be the minimum time taken.
This is an image of the problem:

Let the point at which man is standing be B. Now,
$d_{man} = AB = \sqrt{x^2 + 16}$
$d_{bus} = 2+x$
$t_{man} = t_{bus}$ (as time taken by bus to reach B should be equal to time taken by man to reach B, for least time.)
$$\implies \dfrac{x + 2}{10} = \dfrac{\sqrt{x^2 +16}}{1.5}$$
$$\implies 391x^2 - 36x + 6364 = 0$$
This is giving complex roots! Where am i going wrong? Thanks!
Why do you think you're doing something wrong? The man doesn't have time to cross the road before the bus mows him down -- after just one second the bus will be 8 m to the right of his starting position, whereas he can't possibly have reached the other side yet, nor outrun the bus.
He should walk backwards along the sidewalk until the bus has passed, and then cross the street perpendicularly.