The motion in perpendicular directions is independent of each other. So we have:
Here because nothing is making it accelerate in the x direction and .
Now, you have an initial velocity pointed at 45 degrees above the horizontal. This is a vector. So your components in the x and y direction will depend on this angle.
For example, let's call +y upward and +x along the ground in the relative direction the ball was shot in. Then