To solve this problem, we must imagine the triangles and parallel lines which are formed. It is best to draw the triangle described in the problem so that you can clearly understand what I will be talking about.
The first step we have to do is to make an equality equation in triangle ABC.
In triangle ABC, we are given that lines XY and BC are two parallel lines (XY || BC). Therefore this means that:
AX / XB = AY / YC ---> 1
The next step is to make an equality equation in triangle AXC.
We are given that lines ZY and XC are two parallel lines (ZY || XC). Therefore this also means that:
AZ / ZX = AY / YC ---> 2
Combining 1 and 2 since they have both AY / YC in common:
AX / XB = AZ / ZX
we are given that:
AZ = 8, ZX = 4 therefore AX = AZ + ZX = 12, hence
12 / XB = 8 / 4
XB = 6