Let the ball be projected with a velocity u at an angle θ from the horizontal. At time t, the x and y coordinates will be given by
x=u cosθ t
y=u sinθ t−12gt2=u sinθt−5t2
Comparing with this, we get
u cosθ=6
and u sinθ=8
Solving, we get θ=tan−143 and v=10 m/s.