its easy to check these
just expand the brackets
which is not your original equation
the second one should be
an equation in the form ax^2+bx+c=0 is called a quadratic equation. it can always be written as product of two factors.
1) a^2+4b-ab-4a
=a^2-ab+4b-4a
=a(a-b)+4(b-a)
=(a-b)(a-4) [there are two factors]
2)r^2-2r+1
=r^2-r-r+1
=r(r-1)-(r-1)
=(r-1)(r-1) (again two factors though equal)
=(r-1)^2
so before writing r(r-2)+1 remember quadratic equations can be written as product of two factors