something to keep in mind for most formulae if the form is (A+B) or something you can still use it for (A-B) you just add a negative number like (A+(-B))
so the squaring formula sergius was trying to remember goes (A+B)²= (A)²+(2AB)+(B)² this way if B or A turn out negative the middle will be negative but if both are the negatives cancel.
Another useful trick is that (A+B)*(A-B) = A² - B² this is generally referred to as a difference of squares an examplre being 4-X² = (2-X)(2+X)
Also if you have somthing else like (A+B)*(C+D) it can be expanded out to AC+AD+BC+BD the main thing to note here is that you just multiply everything in one set of brackets by everything in the other and add all the bits at the end
most of the tricks only come down speeding up some of the longer operations like the one I just showed, as you will note that both of the previous things I mentioned could be gotten using the last one, just taking a while longer. If you can get the more basic fundamental ideas of algebra like multiplication, addition, and exponents most of the later rules really just come as an extension or pattern in those previous ones.
I suppose I should explain why my squaring formula is different,
when you have two things multiplied then squared they are equivalent to two things squared then multiplied like this (a*x)² = a²*x², in sergius' example he uses 'ax' where I use 'A' and 'by' where I use 'B' so to show they are the same we can replace them like this
(A)² + (2AB) + (B)²
(ax)² + 2(ax*by)+(by)² which expands out to
a²x² + 2abxy + b²y²