So AC is AB + AC, which in this case is 2 + x + 4, or x + 6 when simplified. Using this info, we can use proportions to solve for x. In this case, our proportion is:

Firstly, cross-multiply:

Next, subtract 5x on both sides:

Next, subtract 24 on both sides, and your answer will be 6 = x.
Now that we have x, we can solve for AC and BC.
Starting with BC, just add 4 to 6 and your answer will be 10.
Next with AC, just add 6 to 6 and your answer will be 12.
In short, the answer is x = 6, BC = 10, and AC = 12, or A.