first we have B = 180 - A - C = 180 - 3x - x
then we also find that B = B1+B2 (2 small triangle from left to right)
B1 = 180 - (A + D1) = 180 - (45 + 3x) = 135 - 3x
B2 = 180 - D2 - C = 180 - (180 - 45) - x = 45 - x
since B = B1 + B2 = 135 -3x + 45 - x = 180 - 3x - x
look up on the first line ( is this look familiar?)
result B = B1 + B2 = A + C
Now we got
B = A + C
and B = 180 - A - C
so A + C = 180 -A - C
=> A + C + A + C = 180
=> 2A + 2C = 180
plug in the real value A = 3x and C = x
=> 2(3x) + 2x = 180
=> 6x + 2x = 180
=> 8x = 180
=> x = 22.5
The End!
From the attached sketch
$\displaystyle 3x+b=180^o-45^o=135^o=3(45^o)$
$\displaystyle x+a=180^o-135^o=45^o$
Therefore 3x+b = 3(x+a) = 3x+3a
Hence b = 3a.
When the third apex is on the circle, x=a and 3x=b=3a, so 2x=45 degrees, so x=22.5 degrees.
When it isn't...
If...
$\displaystyle (3x+z)=3(x+e)$
then, as
$\displaystyle (x+e)+c=45^o$
$\displaystyle (3x+z)+y=135^o=3(45^o)$
this means
$\displaystyle y=3c$
The third apex of triangles ABD and ABC may be anywhere on the red line,
above the horizontal.
Therefore x ranges from 0 to 45 degrees.
However, the interior triangles may no longer touch at B.
To find out if x can be any other angle than 22.5^o...
we can use the Law of Sines.
$\displaystyle \frac{Sin3x}{|BD|}=\frac{Sinb}{k},\ \frac{Sinx}{|BD|}=\frac{Sina}{k}$
$\displaystyle |BD|=\frac{kSin3x}{Sinb}=\frac{kSinx}{Sina}$
b=3a
$\displaystyle \frac{Sin3x}{Sin3a}=\frac{Sinx}{Sina}$
$\displaystyle Sin3x=3Sinx-4Sin^3x$
$\displaystyle \frac{3Sinx-4Sin^3x}{3Sina-4Sin^3a}=\frac{Sinx}{Sina}$
$\displaystyle \frac{Sinx\left(3-4Sin^2x\right)}{Sina\left(3-4Sin^2a\right)}=\frac{Sinx}{Sina}$
$\displaystyle 3-4Sin^2x=3-4Sin^2a$
$\displaystyle Sin^2x=Sin^2a$
$\displaystyle Sinx={\pm}Sina$
As x and "a" are acute, Sinx=Sina, x=a.
Thus x=22.5 degrees.
That argument assumes that the two green lines intersect at a point on the red line. But that is not the case. If z = 3e ≠ 0 then the two green lines will not intersect on the red line. Alternatively, if the two green lines do intersect on the red line then it is impossible to have z = 3e (or y = 3c) unless z = e = 0.
The only solution to the problem is x = 22.5º.