My approach If $f(a,b)$ where $a\in A$ and $b\in B$ be the transformation from $A\times B$ to $B\times A$ then $f(a,b)=(b, a)$. I proved homorphism like this
$f((a, b) +(a', b'))=f((a+a',b+b'))=(b+b',a+a')$ .
$f(a,b)+f(a',b')=(b+b',a+a')$ .
Is this correct or should I prove that $f((a, b). (a', b'))=f(a,b).f(a',b')$ . How do I prove onto and one one aren't those very trivial and how do I write the proof?
Yes, the idea is good.
You take a function $f:A\times B\to B\times A$, $(a,b)\mapsto (b,a)$.
Then you proof that this defines a homomorphism, as you have done it.
Now we need to check if it is bijective. The easiest way is to give the inverse function $f^{-1}$. What should this function be?
The existence of an inverse function implies the bijection.