Didn't do by naive method coz the equation turns out to be complex.
Simply try for different values of x.
x cannot be less than 2, it is at least 2
For x = 2, f(x) = $\binom{2}{2}*2^{n-2}$ = $\frac{2^{n}}{4}$
For x = 3, f(x) = $\binom{3}{2}*2^{n-3}$ = $\frac{3}{8}*2^{n}$
For x = 4, f(x) = $\binom{4}{2}*2^{n-4}$ = $\frac{3}{8}*2^{n}$
For x = 5, f(x) = $\binom{5}{2}*2^{n-5}$ = $\frac{5}{16}*2^{n}$
$\frac{5}{16} < \frac{3}{8}$
after that value of f(x) won't increase. So max value of f(x) = $\frac{3}{8}*2^{n}$