It seems you confuse the precedence of operations, which describe how to interpret an expression (and thus which transformations are actually valid), with the order in which you apply valid transformations to an expression.
For your specific formula, $(2+3)^2$, the precedence rules say that the parentheses override the implicit precedences that otherwise would have been in effect. That is, the precedence rules say that the expression means that the sum $2+3$ is taken to the second power (i.e. squared), as opposed to $2+3^2$ which would mean that $2$ and the square of $3$ would be added.
However the precedence rules do not say that you need to calculate the term in parentheses first (although in this special case, it's the most economic choice). You have two valid transformations that you can apply (well, actually there are many more, but the others would only make the problem more complicated):
You can do the sum first: It's a subexpression $2+3$ which you can replace by $5$, because $2+3=5$. Doing so, you'll get $(2+3)^2 = 5^2$. Then you can go on by using the fact that $5^2=25$ to finally arrive at the result $(2+3)^2 = 25$.
You can do the square first: Since it is the square of a sum, you can use the binomial formula to obtain $(2+3)^2 = 2^2 + 2\cdot 2\cdot 3 + 3^2$. Again, you can continue to find $2^2+2\cdot 2\cdot 3 + 3^2 = 4 + 12 + 9 = 25$. The result is the same again, as it of course has to be.
However what you cannot do is to first replace $3^2=9$ because the original expression does not contain the subexpression $3^2$. Of course after applying the binomial formula, a subexpression of that form appears, which you then can replace by $9$.
Similarly, in $2+4\cdot 5$, the precedence rules say that this is the same as $2+(4\cdot 5)$, and therefore there's a subexpression $4\cdot 5$ which you can replace with $20$, but there is no subexpression $2+4$ which could be replaced by $6$. However you could, in principle, first write $2=2\cdot 1$ and $4=2\cdot 2$, and then use the distributive law to get $2\cdot 1 + 2\cdot 2\cdot 5 = 2\cdot (1+2\cdot 5) = 2\cdot 11 = 22$, and again, you get, necessarily, the same result as when simplifying in precedence order, $2+4\cdot 5 = 2 + 20 = 22$. However if you got the precedence wrong and started by replacing the non-subexpression $2+4$ with $6$, you'd arrive at $6\cdot 5 = 30\ne 22$, which is the wrong result.
Note that while in the cases above, applying the operations in precedence order is the most efficient, this is not always the case. Indeed, you can even have cases where first going to a more complicated expression simplifies the complete calculation. As an example, consider the expression $999^2$. While you can directly calculate it as $999\cdot 999$ using the standard multiplication algorithm, it is much easier to first split it into a difference and apply the binomial formula:
$$999^2 = (1000-1)^2 = 1000^2 - 2\cdot 1000\cdot 1 + 1^2
= 1\,000\,000 - 2000 + 1 = 998\,001$$
This is possible because each single step is a valid operation; note how the replacement of $999$ by $1000-1$ requires the addition of parentheses due to the precedence rules (we replace the expression $999$ by the expression $1000-1$, but without the parentheses we'd get $1000-1^2$ which doesn't even contain the subexpression $1000-1$). Also note that the first step would be futile if we then proceeded by doing the addition in parentheses first, as we'd just arrive at the starting point again.