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
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...
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.
As x and "a" are acute, Sinx=Sina, x=a.
Thus x=22.5 degrees.
The only solution to the problem is x = 22.5º.