No. of car having tyre problem (X) = 2.
 
No. of car having break problem (Y) = 1.
 
No. of car which are in good running condition = 2.
 
Therefore, the joint probability mass function is,
 
 
 
 
 
 
Now, marginal probability function of X is,
 
 
 
 
Now, marginal probability function of Y is,