Ans: $7$
$\begin{array}{rcl}
P(\text{drawing a red ball}) & = & \dfrac{\text{number of red balls}}{\text{total number of balls}} \\
\dfrac{2}{5} & = & \dfrac{8}{n + 5 + 8}\\
2n + 26 & = & 40\\
2n & = & 14 \\
n & = & 7
\end{array}$
$\begin{array}{rcl}
P(\text{drawing a red ball}) & = & \dfrac{\text{number of red balls}}{\text{total number of balls}} \\
\dfrac{2}{5} & = & \dfrac{8}{n + 5 + 8}\\
2n + 26 & = & 40\\
2n & = & 14 \\
n & = & 7
\end{array}$