Given that triangles \( \triangle A Y B \sim \triangle X Y Z \), we can use the properties of similar triangles to find the length of \( BZ \).
From the similarity of triangles, we have:
\[ \frac{AY}{AX} = \frac{AB}{YZ} \]
Since \( AY = AX \), let's denote \( AY = AX = 12 \).
Now, substituting the known values:
\[ \frac{12}{12} = \frac{5}{YZ} \]
This simplification gives us:
\[ 1 = \frac{5}{YZ} \]
Thus, we find:
\[ YZ = 5 \]
Next, we are also given that \( BY = BZ \). Let us denote \( BY = BZ = x \).
Since point \( Z \) lies on the line segment \( YZ \), we can express the length of \( YZ \):
\[ YZ = YB + BZ \]
Substituting the values we have:
\[ YZ = x + x = 2x \]
We know from above that \( YZ = 5 \), hence:
\[ 2x = 5 \]
Solving for \( x \):
\[ x = \frac{5}{2} = 2.5 \]
Thus, the length of \( BZ \) is:
\[ \boxed{2 \frac{1}{2}} \]