You have expressions for horizontal and vertical displacements; at the point at which the ball hits the slope, their ratio will be tan 10°. You can use this to solve for the relevant t in terms of 𝜃, and then use this value to get an expression for the horizontal displacement at that point, again in terms of 𝜃. Finally, find the value of 𝜃 that gives the maximum value of this h.d. by differentiating the expression w.r.t. 𝜃 and setting equal to zero as per usual.
Let me know how you get on?