An object is thrown at 30 m/s and at a 40 degree angle. What is the range of the object, given that the ground is horizontal and flat?

I'm not sure whether to use (vi^2sin2x)/g or x = Vh*t.

Vi = 30 sin 40

u = 30 cos 40

h = 0 + Vi t - 4.9 t^2
0 = 30 sin 40 t - 4.9 t^2
0 = t (30 sin 40 - 4.9 t)
so
t = 30 sin 40/4.9 for downrange time

range = r = u t
r = 30 cos 40 * 30 sin 40 /4.9
= 30^2 sin 80/9.8
so the first one :)