Here's one source of matrices $A$ and $B$: reflections in $\Bbb R^2$ can be achieved as half-rotations (that is, $180^\circ$ rotations) in $\Bbb R^3$ (and more generally, reflections in $\Bbb R^n$ can be achieved as rotations in $\Bbb R^{n+1}$).
As an example, consider the reflection (in $\Bbb R^2$) across the $y$-axis (the line $x = 0$). We can find two $3 \times 3$ matrices that do the same thing to the $xy$-plane $\{(x, y, 0):x, y \in \Bbb R \}$.
Try and find the matrix $A$ that gives the reflection across the $yz$-plane, and the matrix $B$ that gives the half-rotation in the $xz$-plane (so about the $y$-axis).
Then, if $C$ is the matrix that projects the point $(x, y, z)$ to $(x, y, 0)$, we have $AC = BC$, since both $A$ and $B$ perform the same action on the plane $xy$-plane.