
notice the picture of the graph added here
low and behold, x = -17, y is 0, and x= 15, y is 0
the graph is touching the x-axis, an x-intercept
or so-called, a "solution"
The maximum value is actually the maximum of y
So, you don't need to care about the stuff inside cosine function,
Cosine function is always within the range of [-1,1]
So here, ymax = -1 + 6* 1 = 5