Find $r$ which maximizes $\binom{20}r\binom{20}0+\binom{20}{r-1}\binom{20}1+\binom{20}{r-2}\binom{20}2+\cdots+\binom{20}0\binom{20}r$

This expression counts the ways to select $r$ from $40$ elements by splitting the $40$ elements into two groups of $20$ each and summing over all ways to divide up $r$ between the two groups. Thus this is $\binom{40}r$.


The coefficient of $x^m$ in $$(1+x^a)^n(x^b+1)^n$$

is $$\displaystyle\sum_{r=0}^m\binom nr\binom n{m-r} x^{(a-b)r+bm}$$

Let us set $a-b=0, b=1$

So, we need the coefficient of $x^m$ in

$$(1+x)^n(x+1)^n=(1+x)^{2n}$$ which is $$\binom{2n}m$$

Here $n=20$