The midline is at y = 2, so the amplitude, A = 10 - 2 = 8. The period, T = 6pi - 2pi = 4pi.
The form of the equation will be y = 2 - A*cos(2*pi*x/T)
We have this form :
y = Acos [ B (x + C) ] + D
A = the amplitude = [ 10 - -6] / 2 = 8
B = the number of periods in 2pi = 2pi / the period
The period = 4 pi ....so...
B = 2pi / [ 4pi] = 1/2
C = the phase shift
The normal cosine curve has its first max at x = 0
This one has its first max at 2pi
So.....this is a shift to the right of 2pi
So... C = -2pi
D = the midline = [ 10 - 6] / 2 = 4/2 = 2
So....the function is
y = 8cos [ (1/2) (x - 2pi) ] + 2
See the graph here : https://www.desmos.com/calculator/bztp33f42u