For reference: (exact copy of question): In the $ABCD$ quadrilateral, the diagonals intersect at $Q$. In the prolongation of $BC$, the point F is marked: $\angle BCA=\angle FCD, \angle BAC=\angle CAD, AD=12, QC=3, CD=7$. Calculate AB. (answer: $9$)
My progress: Follow the figure according to the statement. I didn't get great evolutions...I didn't get great evolutions...maybe there is some theorem that can help angle bisector theorem: $\triangle ABD:\frac{AB}{BQ} =\frac{AD}{DQ}\\ \triangle AHD: \frac{AH}{HC}=\frac{12}{7}$
T.Menelao: $AB.HC.DG = BH.CD.AG\\ AB.HC.DG = BH.7.(12+DG)\\ $ ...


Using your notation,