Step 1:

Let $X$ be the random variable denoting the number of times heads turns up when 4 coins are tossed simultaneously.

The probability of getting a head in 1 throw =$\large\frac{1}{2}$$=p$

$X\sim B(4,\large\frac{1}{2})$

Step 2:

The probability distribution of $X$ is given by

$P(X=x)=nC_xp^xq^{n-x}$

$P(X=x)=4C_x(\large\frac{1}{2})^x(\large\frac{1}{2})^{4-x}$

$\qquad\qquad=(\large\frac{1}{2})^4$$4C_x\qquad x=0,1,2,3,4$

Step 3:

$P(X=2)=(\large\frac{1}{2})^4$$4C_2$

$\qquad\qquad=\large\frac{1}{16}\times \frac{4\times 3}{1\times 2}$

$\qquad\qquad=\large\frac{3}{8}$