<s>[INST] ABC is Isosceles right triangle with $AB=BC$ $P$ , $Q$ are points on $AC$ such that $AP ^2 + CQ^2 = PQ^2$ What is the value of angle $PBQ (x) $? 
ABC is Isosceles right  triangle with $AB=BC$
           $P$  , $Q$ are points on  $AC$ such that 
  $$AP ^2  + CQ^2  =  PQ^2$$

What is the value  of angle $PBQ (x) $?

Thank you for help 
 [/INST] Let $AC=1, AP=x, CQ=y.$ Then, $x^2+y^2 = (1-x-y)^2\Rightarrow  2x+2y-1=2xy$ or $y = \dfrac{3}{2x+2}-1=\dfrac{1-2x}{2-2x}.$ By theorem of Cosine, $BP^2 = \dfrac{1}{2}+x^2 - 2x\dfrac{1}{\sqrt{2}}\cos\dfrac{\pi}{4} = x^2-x+\dfrac{1}{2}$ and similarly $BQ^2 = y^2-y+\dfrac{1}{2}.$ Therefore, $$\cos\angle PQB = \dfrac{BP^2+BQ^2-PQ^2}{2BP\cdot BQ} = \dfrac{1-x-y}{2BP\cdot BQ} = \dfrac{2x^2-2x+1}{2-2x}\cdot \dfrac{1}{2\sqrt{(x^2-x+\frac{1}{2})\frac{2x^2-2x+1}{4(x-1)^2}}}=\dfrac{1}{\sqrt{2}},$$
So $\angle PBQ = \dfrac{\pi}{4}.$ 
</s>