a(a-1)-b(b-1)
Apply the distributive property.
a⋅a+a⋅-1-b(b-1)
Multiply a by a.
a2+a⋅-1-b(b-1)
Move -1 to the left of a.
a2-1a-b(b-1)
Rewrite -1a as -a.
a2-a-b(b-1)
Apply the distributive property.
a2-a-b⋅b-b⋅-1
Move b.
a2-a-(b⋅b)-b⋅-1
Multiply b by b.
a2-a-b2-b⋅-1
a2-a-b2-b⋅-1
Multiply -1 by -1.
a2-a-b2+1b
Multiply b by 1.
a2-a-b2+b
a2-a-b2+b
Factor a(a-1)-b(b-1)