Relation between a Fourier series harmonic component and its power
See first of all, you have confused magnitude spectrum to power spectrum. The figure you have shown in green is not power but amplitude spectrum hence y axis is represented as "Magnitude"

what is happening in the figure you have shown is the periodic signal is expressed as a trigonometric series where 

$$x(t)= a_0 +\sum_{k=1}^{\infty} [a_k\cos(k\omega_0t) +b_k\sin(k\omega_0t)]$$

where $a_k$ and $b_k$ are trigonometric Fourier series coefficients and $\omega_0$ is fundamental period of signal x(t).

Now to express the amplitude and phase of the periodic signal in terms of Fourier series coefficients, trigonometric series representation is inconvenient as determining phase and magnitude of spectrum cannot be done directly from the above mentioned equation.

So we generally express periodic signal in terms of polar form of Fourier series where the polar form is given by
$$x(t) = M_0 + \sum_{k=1}^{\infty} M_k \cos(k\omega_0t - \phi_k)$$

where from the above expression you can see that $M_k$ denotes amplitude at kth harmonic and $\phi_k$ represents the phase of the kth harmonic.

where 
$$M_0 =a_0$$ 
To find the remaining terms $a_k$ and $b_k$ in terms of $M_k$ and $\phi_k$, let's expand the summation of both the expressions of $x(t)$ and equate them.

i.e.  $$a_k\cos(k\omega_0t) +b_k\sin(k\omega_0t) = M_k\cos(k\omega_0t-\phi_k)$$

now expand the right hand side equation which is of form $\cos(A-B)$

So $$a_k \cos(k\omega_0t)+b_k \sin(k\omega_0t) = M_k\cos(k\omega_0t)\cos(\phi_k) +M_k \sin(k\omega_0t)\sin(\phi_k)$$

so equating coefficients on both sides we get 

$$ a_k = M_k \cos(\phi_k)$$

and $$b_k = M_k \sin(\phi_k)$$

now to find magnitude $M_k$, square and add both the above terms, then we get

$$M_k =\sqrt{a_k^2 +b_k^2}$$

and phase is obtained by dividing the expressions for $a_k$ and $b_k$

$$\phi_k = \arctan(b_k/a_k)$$

Now the graph you have shown in green is the plotted $M_k$ values.

Note that you can also find magnitude and phase using exponential Fourier series coefficients, but then you will have both positive and negative harmonics in exponential Fourier series unlike trigonometric Fourier series which has only positive harmonics. So polar form can be seen as a direct equivalence with the trigonometric Fourier series coefficients.