I think the first numerator cant be Z so I solved the question assuming it is 2;
Answer:
(x,y,z)=(1,5,7)
Hope this helps.
There are

ways of selecting two of the six blocks at random. The probability that one of them contains an error is

So

has probability mass function

These are the only two cases since there is only one error known to exist in the code; any two blocks of code chosen at random must either contain the error or not.
The expected value of finding an error is then
Answer:
is it me or can I not see anything