That answer can't be correct since every term has an 'a' in it. For example, if a=0 then we have
27 + (2a -5)^2
= 27 + (0-5)^2
= 27 + (-5)^2
= 27 + 25
= 52
but
(2a) (9 - 6a + 15 + 4a -20a +25)
(2x0) (9 - 6x0 + 15 + 4x0 -20x0 +25)
0 (9 - 0 + 15 + 0 - 0 +25)
0
They aren't equal, so that answer is wrong. Who told you it was right?
Let's do the problem correctly instead. When you multiple 2a-5 by 2a-5, you multiply all four combinations of terms. It's the FOIL rule: First, Outside, Inside, Last.:
27 + (2a -5)^2
27 + (2a -5) x (2a -5)
27 + (2a x 2a) + (2a x -5) + (-5 x 2a) + (-5 x -5)
Simplifying each term:
27 + (2a x 2a) + (2a x -5) + (-5 x 2a) + (-5 x -5)
27 + 4a^2 - 10a - 10a + 25
Combining like terms:
27 + 4a^2 - 10a - 10a + 25
4a^2 + (-10a -10a) + (27 + 25)
4a^2 - 20a + 52