I always draw a picture.

So we've got an origin where the shell leaves the cannon (I'll assume it's on the ground at a height of 0 ft.) I am defining +x to the right and +y upward. The initial velocity of the shell is 800 ft/s, at an angle of 45 degrees above the horizontal (to the right in my diagram.)

Note that the shell has no accleration component in the x direction. Thus we know that:

x = x0 + v0x*t

Now, x0 = 0 ft, because the shell started at the origin. v0x = v0*cos(45) = 565.685 ft/s, so

x = 565.685*t

We don't know t.

So let's talk about the motion in the y direction.

y = y0 + v0y*t + (1/2)ay*t^2

Again, y0 = 0 ft, because the shell started at the origin. v0y = v0*sin(45) = 565.685 ft/s, and ay = -32 ft/s^2. So:

y = 565.685*t - 16*t^2

We want the point where the shell hits the ground, so we know that y = 0:

0 = 565.685*t - 16*t^2

Now solve for t:

0 = t(565.685 - 16*t)

Thus t = 0 s or 565.685 - 16*t = 0. The t = 0 s solution is where the shell started, we don't care about this. Thus:

565.685 - 16*t = 0

t = (565.685/16) = 35.355 s.

Going back to the x equation:

x = 565.685*t = 565.685*35.355 = 20000 ft.

-Dan