Remember that
The side splitter theorem states that if a line is parallel to a side of a triangle and the line intersects the other two sides, then this line divides those two sides proportionally
In this problem
we have that
x/8=12/4
solve for x
x=(12/4)*8
x=24