Given a, b is a rational number, and a square+b square+5+2a-4b=0, find the value of the square of algebraic expression (a-b)

Given a, b is a rational number, and a square+b square+5+2a-4b=0, find the value of the square of algebraic expression (a-b)

Because: a2+b2+5+2a-4b=0
(A2+2a+1)+(b2-4b+4)=0
(A+1)2+(b-2)2=0 Because the square of any number is non-negative, we can get:
(A+1)2=(b-2)2=0
Solution: a=-1, b=2
(A-b)2
=(-1-2)²
=9

Because: a2+b2+5+2a-4b=0
(A2+2a+1)+(b2-4b+4)=0
(A+1)2+(b-2)2=0 Because the squares of any number are non-negative, we can get:
(A+1)2=(b-2)2=0
Solution: a=-1, b=2
(A-b)2
=(-1-2)²
=9

When a, b is what value, the square of algebraic expression a + b -2a -4b +6 is the smallest value? What is the minimum value? When a, b is what value, the square of algebraic expression a+b-2a-4b+6 is the smallest value? What is the minimum value?

A^2+b^2-2a-4b+6
=(A^2-2a+1)+(b^2-4b+4)+1
=(A-1)^2+(b-2)^2+1
Minimum when a=1, b=2
Minimum =1
A^2 represents the square of a