The technique to be used depends heavily on context. The problem is a standard linear programming problem. But since you are using the tag "quantitative aptitude," we will first try to solve the problem by reasoning.
The number of votes $A$ gets is largest if (i) $B$ gets exactly $20\%$ of the votes $A$ gets, and (ii) $B$ gets $80\%$ of the votes $C$ gets. Let $z$ be $C$'s vote percentage. Then $B$'s is $(0.8)z$, and $A$'s is $(5)(0.8z)$.
But the vote percentages add up to $100$. This gives the equation $(5)(0.8z)+(0.8z)+z=100$. So $5.8z=100$, and therefore $z=\frac{100}{5.8}$. It follows that $A$ gets the percentage $\frac{400}{5.8}$, a bit under $69\%$ of the vote.
Another way: Another approach is graphical. We stop using percentages, and use fractions instead. Let $x$, $y$, and $z$ respectively be the fractions of the vote obtained by $A$, $B$, and $C$. We have $x+y+z=1$, and therefore $z=1-x-y$. So effectively we have a two variable problem.
Now you will need to use paper and ruler, and draw carefully the lines described below. We are told that $x \ge \frac{2}{5}$. Draw the line $x=\frac{2}{5}$. We must be to the right of it.
We are told that $y \ge \frac{1}{5}x$. Draw the line $y=\frac{x}{5}$ or equivalently $5y=x$. We must be above it.
We are told that $y \le \frac{4}{5}z$. So $y \le \frac{4}{5}(1-x-y)$, which simplifies to $\frac{9y}{5} \le \frac{4}{5} -\frac{4}{5}x$. Draw the line $\frac{9y}{5}=\frac{4}{5}-\frac{4x}{5}$, that is, $9y=4-4x$. We must be below this line.
If you consider the three geometrical constraints, and have drawn the diagram carefully, you will see that we must be in a certain triangle. And it is obvious that $x$ is biggest at the rightmost corner of that triangle, which is where the lines $5y=x$ and $9y=4-4x$ meet. Solve to find $x$.
Remark: In the real world, problems with a similar structure occur, often with hundreds (or more) variables and hundreds (or more) linear constraints. There are efficient procedures, such as the simplex method, for solving such problems, of course by computer. The field is called Linear Programming. It is of great practical importance.