Om Swastyastu.
\[ a_x = -g\sin\alpha \]
\[ a_y = -g\cos\alpha \]
\[ v_x = v_0\cos\beta - gt\sin\alpha \]
\[ v_y = v_0\sin\beta - gt\cos\alpha \]
\[ x = v_0t\cos\beta - (1/2)gt^2\sin\alpha \]
\[ y = v_0t\sin\beta - (1/2)gt^2\cos\alpha \]
\[ y = 0 \]
\[ t = T = (2v_0\sin\beta)/(g\cos\alpha) \]
\[ R = v_0T\cos\beta - (1/2)gT^2\sin\alpha \]
\[ R = \frac{2v_0^2\sin\beta}{g\cos\alpha}(\cos\beta - \sin\beta\tan\alpha) \]
\[ dR/d\beta = 0 \]
\[ \tan2\beta = \cot\alpha \]
\[ \beta = \pi/4 - \alpha/2 \]
Wassalamu'alaikum warahmatullahi wabarakatuh.