(*Part A*)
N[20!*20!*2^20 /40!]

(*Part B*)
N[Binomial[20,10]*(20!*20!)/40!]

(*Part C (answer)*)P[n_]:=Binomial[20,2n]^3*((2n)!)^2*Binomial[20-2n,10-n]*((20-2n)!/2^(10-n))^2/(40!/2^(20))

(*Check Part C (answer).  The events are mutually exclusive and exhastive, so the sum of their probabilityes must be 1.*)Sum[P[n], {n,0,10}]

(*Bingo*)

TableForm@Table[{n,N@P[n]}, {n, 0, 10}]

(*Suppose instead of 20 cups,and 40 balls, we have 2M cups.*)P[M_,n_]:=Binomial[2M,2n]^3*((2n)!)^2*Binomial[2M-2n,M-n]*((2M-2n)!/2^(M-n))^2/((4M)!/2^(2M))

P[M,n]

(*Amazingly, Mathematica can compute this sum symbolically.  It uses a remarkble algorithm discovered by Gosper.*)Sum[P[M, n], {n, 0, M}]

TableForm@Table[{n,N@P[100,n]}, {n, 0, 100}]

ListPlot[{Table[{n,N@P[100,n]}, {n, 0, 100}],Table[{n, N@Binomial[100,n]/2^100}, {n, 0, 100}]}, PlotRange->All, PlotStyle->{Red, Blue}]