Let $\cos^{-1} \sqrt{p} + \cos^{-1} \sqrt{1-p} + \cos^{-1} \sqrt{1-q} = \frac{3\pi}{4} $ ......(i)
Let $a = \cos^{-1} \sqrt{p}$
$ b = \cos^{-1} \sqrt{1-p} $ and
$c = \cos^{-1} \sqrt{1-q} $
$\Rightarrow \cos a = \sqrt{p}$
$ \cos b = \sqrt{1-p}$
$ c = \sqrt{1-q}$
$ \Rightarrow \cos^{2} a = p ,$
$ \cos^{2}b = 1 -p \cos^{2} c = 1 -q$
Now, $ \sin^{2} a = 1 - \cos^{2} a = 1 - p$
$ \Rightarrow \sin a = \sqrt{1-p} $
$\sin^{2}b = 1 -\cos^{2} b = 1 - 1 + p $
$\Rightarrow \sin b = \sqrt{p}$
$ \sin^{2} c = 1 - \cos^{2} c = 1 - 1 + q = q$
$ \Rightarrow \sin c = \sqrt{q} $
$\therefore $ equation (i) can be written as
$\therefore a +b +c = \frac{3\pi}{4}$
$ \Rightarrow a +b = \frac{3\pi}{4} -c$
Take cos on each side, we get
$ \cos\left(a+b\right) = \cos \left(\frac{3\pi}{4} - c \right) $
$\Rightarrow \cos a \cos b - \sin a \sin b$
$ = \cos\left\{\pi - \left(\frac{\pi}{4} + c\right)\right\} = - \cos\left(\frac{\pi}{4} + c\right)$
Put values of cos a, cos b and sin a, sin b,
we get
$ \sqrt{p}. \sqrt{1-p} - \sqrt{1-p}\sqrt{p} $
$= - \left(\frac{1}{\sqrt{2}} \sqrt{1-q} - \frac{1}{\sqrt{2}} \sqrt{q}\right)$
$ \Rightarrow 0 = \sqrt{1-q} - \sqrt{q} \Rightarrow \sqrt{1-q} = \sqrt{q}$
Squaring on both side
$ \Rightarrow 1 -q = q$
$ \Rightarrow 1 =2q \Rightarrow q = \frac{1}{2} $