It is given that there are 2 major roads from city X to city Y and 4 major roads from city Y to city Z.
A person has to go from X to Z and pass through Y while this is done. There are two ways in which the person can go from X to Y. Once in Y there are 4 ways by which the person can go to Z. This gives the total number of ways in which a person can go from X to Z as 2*4 = 8
The number of trips that can be made from X to Z passing through Y is 8.