Let $G = \{A,B,C\}$ denote a group of order three with respect to a binary operation, which we denote by $\ast$.
If $A\ast B = B$ and if $B\ast C = A$ then compute $A^2,B^2,C^2,B\ast A,C\ast B, A \ast C, C \ast A$
We can tell from the given information that $A$ is acting as the identity and $B$ and $C$ are inverses of each other.
Therefore I computed
$A^2=A$
$B\ast A=B$
$C\ast B=A$
$A \ast C=C$
$C \ast A=C$
but I cannot figure out $B^2$ and $C^2$.
You have $B^3=A$ because the group is of order $3$. Therefore $$ \begin{align} B^2 &= B^2 * A\\ & = B^2 * B * C\\ & =B^3*C\\ &=A*C\\ & = C. \end{align}$$
You can obtain similarly $C^2$.
Another way to see it is to say that the order of $B$ is either $3$ or $1$ (the order of $B$ should divide $3$, order to the group). Since it is not $1$, it is $3$. And therefore $B^2$ is neither $B$ nor $A$, and consequently it is $C$.
Finally, an interesting fact is that the only finite abelian group of order $3$ is $(\mathbb Z/3\mathbb Z, +)$ where $1$ and $2$ are opposite and $1+1=2$ and $2+2=1 [3]$. Therefore you can identify $B$ to $1$ (or $2$) and $C$ to the other one and conclude that $B^2=C$ and $C^2=B$.