Rearrange the Projectile Motion equation

I have a real big problem. My physics teacher has given an extra-credit assignment to my class to figure out. He said we can use whatever we want to figure it out. The problem was to rearrange the Projectile Motion equation (d = Vit + 1/2at2) to solve for t.

So I started out by asking my Math B2 teacher if she knew how to figure it out. After 15 minutes of work she got t = (d/t -vi) 2/a. But she didn't know how to get the second t out of the equation. We both ended up going over to the other math teacher. He got the same thing. Now the three of us are determined to figure out this answer. Can any physics wizard out there help us? All I want to know is how to rearrange the Projectile Motion equation (d = Vit + 1/2at2) to solve for t. For. Example F=ma, to rearrange the equation to sovle for m, it would be m=f/a. So I Want t= ? So can anyone help?
-Puzzled Student

This equation is of the form

$$ax^2+bx +c = 0$$

Use the quadratic formula to solve

$$x = \frac{-b\pm\sqrt{b^2-4ac}}{2a}$$

BobG
$$d=vt + \frac{1}{2} at^2$$
$$\frac{1}{2} at^2+vt - d = 0$$
$$t = \frac{-v \pm \sqrt{v^2+4 \left( \frac{1}{2} a\right)d}}{2 \left( \frac{1}{2} a \right)}$$