Calculus BC problem So I as attempting to solve this problem and just got stuck overall. Since this is just practice an explanation is much more valuable than the answer itself. Thanks!
Here is the problem


Hint:
The slope of the line is $m=\dfrac{\sin(K)-0}{K-0}=\dfrac{\sin(K)}K$, then its equation is $$y=\dfrac{\sin(K)}Kx$$
Now, observe that
\begin{align*}\text{Yellow area }&=\int_0^K\left(\sin x-\dfrac{\sin(K)}Kx\right)dx\\&=1-\cos(K)-\frac{\sin(K)}{2K}K^2\\&=1-\cos(K)-\tfrac K2\sin(K)
\end{align*}
And
\begin{align*}
\text{Green area }&=\int_0^K\dfrac{\sin(K)}Kx\,dx+\int_K^{\pi}\sin x\,dx\\
&=\tfrac K2\sin(K)-\cos\pi+\cos(K)\\
&=1+\cos(K)+\tfrac K2\sin(K)
\end{align*}
