Question 823878
A way I think is easier:
{{{A=(a^2-3a+1)^2-(1-a)(1-2a)(1-3a)}}}
{{{A=(a^2+(1-3a))^2-(1-3a+2a^2)(1-3a)}}}
{{{A=a^4+2a^2(1-3a)+(1-3a)^2-(1-3a+2a^2)(1-3a)}}}
Taking {{{(1-3a)}}} out as a common factor from {{{2a^2(1-3a)}}} and {{{(1-3a)^2}}} we get
{{{A=a^4+(1-3a)(2a^2+1-3a)^2-(1-3a+2a^2)(1-3a)}}}
Notice that the second term, {{{(1-3a)(2a^2+1-3a)^2}}} ,
and the third term, {{{-(1-3a+2a^2)(1-3a)}}} ,
are opposites and cancel each other out.
So we are left with
{{{A=a^4}}}
 
The clench your teeth and dive in way:
{{{A=(a^2-3a+1)^2-(1-a)(1-2a)(1-3a)}}}
{{{A=a^4-6a^3+11a^2-6a+1-(1-3a+2a^2)(1-3a)}}}
{{{A=a^4-6a^3+11a^2-6a+1-(1-6a+11a^2-6a^2)}}}
{{{A=a^4+(-6a^3+11a^2-6a+1)-(1-6a+11a^2-6a^2)}}}
Since the two expressions in brackets are the same, they cancel out, and we are left with
{{{A=a^4}}}
 
TIP:
To calculate products like
{{{(a^2-3a+1)^2=(a^2-3a+1)(a^2-3a+1)=a^4-6a^3+11a^2-6a+1}}} ,
it is better to calculate with pen and paper
by multiplying each term of {{{a^2-3a+1}}} times {{{a^2-3a+1}}} ,
writing each product in a row,
lining up like terms from the different products,
and then adding up the lines, like this:
{{{matrix(3,7,a^4,-3a^3,"+",a^2," "," "," "," ",-3a^3,"+",9a^2,-3a," "," ",
" "," ","+",a^2,-3a,"+",1)}}} {{{matrix(3,2,"=",(a^2)(a^2-3a+1),"=",(-3a)(a^2-3a+1),"=",(1)(a^2-3a+1))}}} 
------------------------------
{{{matrix(1,7,a^4,-6a^3,"+",a^2,-61,"+",1)}}} {{{matrix(1,2,"=",(a^2-3a+1)(a^2-3a+1))}}} 
I do it that way, writing only the parts on the left, before the = sign (the rest I only wrote it here to describe how I calculated each line).
Trying to write the calculations on one line, I would get confused and make a mistake.