Suppose we have a triangle $\triangle ABC$ with two additional points, $D$ on the segment $AB$ and $E$ on the segment $BC$. Increasing the angles $\angle CAD$ and $\angle ECA$ will increase the the angle of $\angle DBE$ until it reaches $180^\circ$ and we end up with a quadrilateral (see image). I want to find the sets of positive angles that need to be added to $\angle CAD$ and $\angle ECA$ for the triangle to be turned into a quadrilateral. E.g. by first picking an angle between 0 and the maximum possible for $\angle CAD$ which would then determine the angle for $\angle ECA$. All segment lengths and angles of the triangle are known, it may also be assumed that $BD = BE$.
I have no idea where to begin to tackle this problem.

First we calculate the maximum angle allowed to add onto $\angle CAD$ by picking 0 as our angle to add to $\angle ECA$. This means we end up with a quadrilateral where the angle $\angle ECA$ is known (the same as in the triangle) and all sides of the quadrilateral are known. We can use the law of cosines to calculate the diagonal $AE$ and angle $\angle CAE$:
$$AE = \sqrt{AC^2 + CE^2 - 2 * AC * CE \cos\angle ECA}$$ $$\angle CAE = \arccos(\frac{AC^2 + AE^2 - EC^2}{2 * AC * AE})$$
and the angle $\angle DAE$:
$$\angle DAE = \arccos(\frac{AD^2 + AE^2 - DE^2}{2 * AD * AE})$$
by taking $\angle DAE + \angle CAE$ and subtracting from that the original angle $\angle CAD$ in the triangle we find the maximum angle we can add onto $\angle CAD$. We can now use this to pick any suitable angle for $\angle CAD$ and work our way back to $\angle ECA$ using the same approach outlined above.