Consider the angle of inclination to be a and the angle of projection to be b with respect to the ground. Also let the velocity of projection be V. Consider X axis along the incline and Y axis perpendicular to the incline plane.
Therefore Vx = V cos (b - a) and Vy = V Sin (b - a)
gx = g Sin (a) and gy = g cos (a)
Y = Vy t - 0.5 gy t 2
X = Vx t - 0.5 gx t 2
Solving the equations we get the required results.
Time of flight can be obtained by putting Y = 0;
After obtaining T the time of flight, substitute T in X and obtain the range. Check for its maximum value.