Prove that a circle can be inscribed iff the given condition is satisfied I have the following question with me:
"Let $B_1$ and $C_1$ be points on the sides $AC$ and $AB$ of a triangle $ABC$. Lines $BB_1$ and $CC_1$ intersect at point $D$. Prove that a circle can be inscribed inside quadrilateral $AB_1DC_1$ if and only if the incircles of $ABD$ and $ACD$ are tangent to each other."

I start like this:
I introduce notations:

$$AB = c, AC = b, BC = a, AC_1 = x, AB_1 = z, B_1D = y, C_1D = w, BD = q, CD = p$$

To prove the above statement I basically need to prove that the statements $$x + y = z + w$$ and $$c + p = b + q$$
are equivalent. Performing a few computations involving bases I get the following equations :
$$qz(p + w) = bw(q + y)$$ and $$yc(p + w) = px(q + y)$$
How do I proceed from here? Any help is appreciated. Alternative solutions are also welcome
 A: For variety , here is a different solution.

Let us suppose that the incircles of $\triangle$s $ABD$ and $ACD$ are not tangential . Clearly , as in the figure , there are two distinct points of tangency , $G$ and $K$ 
Let $AG$ = $x$ , $GK$ = $\delta$ and $KD$ = $y$ . The line segments of the same color in the figure are equal.

Now consider quadrilaterals $ABDC$ , $AB_1DC_1$ . Let us assume that a circle can be circumscribed by $AB_1DC_1$ . Join points of tangency to form segments $K’L’$ , $M’N’$ . Join $JL$ , $FH$ . The respective dotted segments are parallel , by Thales’ Theorem.
Let $DL’ = a $ , $L’B_1 = b $ , $M’A = c$ and $K’C_1 = d $ . Let $C_1J = q_1$ and $B_1H = q_2 $. 
Using properties of tangents and isosceles $\triangle$s, we have:- $$ AJ = x + \delta = c + d - q_1$$
$$ AH = x = c + b - q_2 $$
From these , we get $$ \delta = d - b - q_1 + q_2 $$ Call this equation (1). Also , we have :-
$$LL’ = a + y = d - q_1 $$ $$ FN’= a+ \delta + y = b - q_2 $$ From these , we get :- $$ \delta = b-d+q_1-q_2$$ Call this equation (2) . Clearly , from (1) and (2) , we get $\delta = 0 $ , a contradiction if the points are distinct . QED
Note:- This is a case in which $H$ and $J$ lie inside the quadrilateral $AB_1DC_1$ , while $F$ and $L$ lie outside it . There exist other cases , which can be proven similarly
A: This is actually a problem from Bulgarian MO, third round, 1999.
For your reference I have copied the solution from "Cyclic quadrilaterals, radical axis and inscribed circles" by Charles Leytem


