I am not clear why you have had trouble.
The equation of motion in the vertical direction is
s(t) = s0 + v0t+ 4.9t2 = 40 + 15t sin 30° - 4.9t2
s'(t) = 7.5 - 9.8t and the maximum height will be attained when s'(t) = 0, i.e. at t= 7.5/9.8 = .765306
The value of s(.765306) = 42.869899
You have not asked about lateral motion, but the equation of motion will have no gravity component and the initial velocity will be modified by the cos 30°.

Paul M.
tutor
Sorry; I’m a math tutor, not a physics tutor. As a result, I am not familiar with kinematic equations. There are several tutors who often answer physics questions. However, I will tell you that often there is more than 1 way to solve a problem &in this case my solution is correct.
Report
02/14/19
Zainab S.
okay but this is not how we're being taught to solve this problem...we're supposed to use the kinematic equations, not functions, so... anyway I could get help with that?02/13/19