If $\frac{MQ}{BA}=\frac{NP}{BC}$ and $\angle MBA = \angle CBN=\frac{\pi}{2}$
And $D, E$ be the midpoint of $MN, PQ$ respectively, then show that $DE \perp AC$
If $P=Q=B$ this is a generalization of Brahmagupta theorem (Figure 2)

If $P=Q=B$ and $M, B, C$ are colliear, and $N, B, A$ are collinear; This case is Brahamagupta theorem


Let $\vec{BA}=\vec{a}$, $\vec{BC}=\vec{c}$, $\vec{QM}=\vec{m}$ and $\vec{PN}=\vec{n}$.
Thus, $$\vec{ED}=\frac{1}{2}(\vec{m}+\vec{n})$$ and we need to prove that $$(\vec{c}-\vec{a})(\vec{m}+\vec{n})=0$$ or $$\vec{c}\vec{m}=\vec{a}\vec{n},$$ which is obvious because $$\frac{|\vec{m}|}{|\vec{a}|}=\frac{MQ}{BA}=\frac{NP}{BC}=\frac{|\vec{n}|}{|\vec{c}|}$$ and $$\measuredangle MBC=\measuredangle NBA.$$ Done!