First, we put the constant in the right-hand side :

#2a^2+8a-5=0#

#<=>2a^2+8a=5#

Then we want to transform #2a^2+8a# to something like #(a+b)^2#

*Recall* : #(color(blue)x+color(red)y)^2 = color(blue)(x^2) + color(green)2*color(blue)xcolor(red)y + color(red)(y^2)#

Here we have #2a^2 + 8a#

#<=> 2xx(color(blue)(a^2)+4a)#

#<=> 2xx(color(blue)(a^2)+color(green)2*color(blue)a*color(red)2)# (Then #"y" = 2#)

#<=> 2xx(color(blue)(a^2)+color(green)2*color(blue)a*color(red)2+color(red)(2^2)-2^2)# (We added and subtract "y^2" for factorize later)

#<=> 2xx((a+2)^2-4)#

Put the last expression inside the equality :

#2a^2+8a=5#

#<=> 2xx((a+2)^2-4)=5#

#<=> 2xx(a+2)^2 - 8 = 5#

#<=> 2xx(a+2)^2 = 13#

#<=>(a+2)^2 = 13/2#

#<=>a+2 = sqrt(13/2) or a+2 = -sqrt(13/2)#

**Then** #a =+-sqrt(13/2)-2#