Proving $\angle QAP=45^\circ$ if $ABCD$ is a square with points $P$ in $BC$, $Q$ in $CD$ satisfying $\overline{BP}+\overline{DQ}=\overline{PQ}$ Here is the problem:

Let $ABCD$ be a square with points $P$ in $BC$, $Q$ in $CD$ satisfying $\overline{BP}+\overline{DQ}=\overline{PQ}$. Prove that $\angle QAP=45^\circ$.

So far I have been trying to show that $\overline{BP}=\overline{DQ}$ so that the sum of angles on both sides of $\angle QAP$ is $45^\circ$
Any hint or guidance will be great, Thanks in advance.

Let $R$ be on $PQ$ such that $\overline{RP} = \overline{BP}$ and $\overline{RQ} = \overline{DQ}$ (such a point can be chosen because $\overline{PQ} = \overline{BP}+\overline{DQ}$). Let $l$ be the line perpendicular to $PQ$ at $R$, and let $A'$ be on $l$ such that $A'$ and $A$ are on the same side of $PQ$, and $\overline{A'R} = \overline{AB} = \overline{AD}$.
Since $\overline{A'R} = \overline{AB}$, $\angle A'RP = 90^{\circ} = \angle ABP$, and $\overline{RP} = \overline{BP}$, by SAS we have $\triangle A'RP\cong \triangle ABP$, and hence $\overline{A'P} = \overline{AP}$. By a similar argument, we have $\triangle A'RQ\cong \triangle ADQ$, and hence $\overline{A'Q} = \overline{AQ}$. BY SSS, we have $\triangle A'PQ\cong \triangle APQ$, and since $A'$ and $A$ lie on the same side of $PQ$, this forces $A' = A$.
Thus, we have $\triangle ARP\cong \triangle ABP$ and $\triangle AQP\cong \triangle ADP$, so $\angle RAP = \angle BAP$ and $\angle RAQ = \angle DAQ$. We thus have
$$90^{\circ} = \angle DAB = \angle DAQ + \angle RAQ + \angle RAP + \angle BAP = 2(\angle RAQ + \angle RAP) = 2\angle QAP$$
from which the claim follows.
