i think that takes a little bit of physics...
think of it like this the acceleration of gravity on earth is 9.8 m/(s^2)
this is important because if its gonna take 6 seconds to go up and down, that means that its gonna spend 3 seconds desaccelerating and 3 seconds accelerating. that means that from the initial speed (your answer) untill it reaches 0 m/s, it will take 3 seconds desaccelerating at 9.8m/(s^2).
desaccelerating at 9.8m/(s^2) means that every second it will lose 9.8m/s in its speed.
so think of it like this, since it will go from the initial speed to 0 in 3 seconds, that means that the initial speed will lose 9.8 after the first second, another 9.8 after the second and finally another 9.8 after the third, at which point the speed will be 0.
So, how much speed did you lose if you add it all up, 9.8*3, which equals 29.4m/s (which is the answer as to how much speed it needed to have).
as to how far up it will go, you have to understand some motion
acceleration = change in speed/time it takes to change the speed
speed = distance an object moves/time it takes for it to move
in mathematical notation this is like this
a=v/t (a stands for acceleration and t stands for time. v stands for velocity which is similar to physics, the difference is only that velocity has a direction and speed doesnt... this doesnt matter so much in our case so dont worry.)
v=d/t (v stands for velocity again, t for time and d for distance.)
now, if you plug the v for the second formula into the v for the first you have:
now, just in case you are not good with fractions (im sorry if you are)
a=(d/t)/(t/1) => a=(d/t)(1/t) => a=d/t^2
now, with this formula you can easily figure how high the ball goes you know that your acceleration is 9.8 and that the time is 3, so just plug those into the formula
9.8=d/3^2 => 9.8=d/9 => d=9.8*9 => d=88.2 meters
in case you didnt get how i got meters here is the same process done only with the units
m/s^2=d/s^2 (when you have the same denominators on both side of an equation you can cancel them out) so you get d=m which means that the distance will come in meters.
I hope this helped you and didnt get you bored because its so long, its just that i really like math and physics and i like to make sure i dont just give an answer without having the other person understand the process used to find it.
hope too see you soon