The figure can be redraw as,
Consider the triangle ACD.
Determine the measure of side AC by using th pythagoras theorem.
Consider the triangle ADB.
Determine the measue of side AB, in terms of variable x, by using pythagoras theorem.
Consider the triangle ABC.
Determine the measure of side AB by using the pythagoras theorem.
The value of variable x is 2.