The derivative of $\cos x$ at $x=\pi/2$ is $-1$, and this should match $q_1'(\pi/2)$. Thus, since $q_1'(x)=2a_1x+b_1$, we have $$2a_1(\pi/2)+b_1=-1.$$
This is the third equation for the first interpolant; the second interpolant will be similar.
The derivative of $\cos x$ at $x=\pi/2$ is $-1$, and this should match $q_1'(\pi/2)$. Thus, since $q_1'(x)=2a_1x+b_1$, we have $$2a_1(\pi/2)+b_1=-1.$$
This is the third equation for the first interpolant; the second interpolant will be similar.