The entries in row n of Pascal's triangle are 1, n,..., n, 1. Additionally, the sum of row n's elements is 2^n.
Additionally, row n has n + 1 terms, so we know from the problem that \({2^n\over{n+1}}=2\).
Cross multiplying, you get \(2^n=2n+2\). The question here is trivial by bash => you will find that n = 3 works. (If you are a quick guess + checker, you might've found that right of the bat quickly, as row 3 is 1, 3, 3, 1 which has an average entry of 2.)