For the answer to the question above,
the time it takes the ball to travel 98 m is
t=98/(v0*cos(45))
where v0 is the speed off the bat
The ball will rise and fall to the same height. There are two ways to get at this answer.
The easy one is to recognize that the time to apogee is 1/2 the total flight time for a projectile that lands at the same elevation as launch
to calculate the time to apogee:
vy(t)=v0*sin(45)-g*t
when vy(t)=0, the ball is at apogee
t=v0*sin(45)/g
again, this is 1/2 the flight time so double it and put it into the horizontal equation above
2*v0*sin(45)/g=98/(v0*cos(45))
rearrange a bit
2*v0^2*cos(45)*sin(45)/g=98
this is commonly referred to as the "range equation".
==============================
A handy identity to know is that
2*sin(θ)*cos(θ)=sin(2*θ)
This assumes the shallow launch angle since 90-θ will also satisfy the range equation.
==============================
Okay, now back to v0
2*v0^2*cos(45)*sin(45)/g=98
v0=sqrt(98*g)
v0=31