We have a segment with 3 points. The complete segment goes from A to C, and point B divides it in 2 sibsegments (AB and BC)
Note that segment AC is composed by those 2 subsegments, so its complete legth will be equal to the sum of the leghts of subsegments AB and BC. Then, we can build the following equation:
As we know the lengths in terms of x, we just need to replace in the previous equation:
Now, we can solve for x: