A formula for the area of bicentric quadrilateral Can you provide a proof for the claim given below? The following claim is inspired by Harcourt's theorem and can be seen as its generalization to quadrilaterals.

Claim. Given bicentric quadrilateral $ABCD$ with area $K$ and semiperimeter $s$ . Denote length of side $AB-a$ ,length of $BC-b$ , length of $CD-c$ length of $DA-d$ , length of diagonal $AC-p$ and length of diagonal $BD-q$. An arbitrary tangent line $t$ is constructed to the incircle of a quadrilateral . Let $n_1$,$n_2$,$n_3$,$n_4$ be a signed distances from the vertices $A$,$B$,$C$,$D$ to tangent line respectively, with a distance being negative if and only if the vertex is on the opposite side of the line from the incenter . Then $\frac{s}{p+q}\left(q(n_1+n_3)+p(n_2+n_4)\right)=2K$ .


GeoGebra applet that demonstrates this claim can be found here.
 A: A good introduction to Harcourt's theorem can be found in Dergiades and
Salazar, Harcourt’s Theorem.  In addition, they state and prove a similar theorem in reference to the excircles of the triangle.  We'll use that here.

Extend lines $AB$ and $BC$ to their intersection $E$.  $d'$ and $b'$ are the lengths of segments $DE$ and $CE$ respectively. $n_5$ is the signed distance of $E$ to the tangent, and can be calculated using congruent triangles in two ways:
$$
\begin{aligned}
n_5 &= n_3+\frac{b'}{b}(n_3-n_2) \\
n_5 &= n_4+\frac{d'}{d}(n_4-n_1)
\end{aligned}\tag{*}
$$
and any weighted sum thereof.

*

*because the quadrilateral $ABCD$ is tangential, $a+c=b+d$. In particular the semiperimeter $s=b+d$.


*because $ABCD$ is cyclic, the triangles $EDB$ and $ECB$ are similar.  Thus $\cfrac{p}{q}=\cfrac{b'}{d'}=\cfrac{d+d'}{b+b'}$.  We can see that the ratio $p/q$ is echoed in other parts of the diagram.  The formula for area that is to be proven is the product of semiperimeter and a $p:q$ weighted sum of the $n_i$'s.  Since $s=b+d$ and $d+d'-b':b+b'-d'=p:q$ we can rewrite the formula as follows.
$$
\begin{aligned}
2K &= \cfrac{s}{p+q}(q(n_1+n_3)+p(n_2+n_4) \\
   &= \cfrac{b+d}{d+d'-b'+b+b'-d'}(b+b'-d')(n_1+n_3)+(d+d'-b')(n_2+n_4) \\
   &= (b+b'-d')(n_1+n_3)+(d+d'-b')(n_2+n_4).\qquad \qquad (1)
\end{aligned}
$$

*

*Let $K$ be the area of $ABCD$ and $K'$ be the area of $EDC$. The incircle of $ABCD$ is also the incircle of $ABE$ and an excircle of $EDC$. By Harcourt's Theorem and the excircle theorem in the reference we can calculate areas:

$$
\begin{aligned}
2(K+K')&=an_5+(b+b')n_1+(d+d')n_2 \\
2K'&= -cn_5+b'n_4+d'n_3 \\
2K &= (a+c)n_5+(b+b')n_1+(d+d')n_2-d'n_3-b'n_4 \\
   &= (b+d)n_5+(b+b')n_1+(d+d')n_2-d'n_3-b'n_4 \qquad \qquad (2)   \\
\end{aligned}
$$
Then let $n_5$ be the weighted sum (using (*) and weights $d,b$ )
$$
\cfrac{d(n_4+\cfrac{d'}{d}(n_4-n_1))+b(n_3+\cfrac{b'}{b}(n_3-n_2))}{b+d}
$$
Then plug this into (2) and simplify (I used Mathematica) to get
$$
2K=(b+b'-d')(n_1+n_3)+(d+d'-b')(n_2+n_4),
$$
which we showed earlier (1) was equivalent to the OP formula.
