Here equivalent means that there exist invertible matrices $P,Q$ such that $A = PBQ$.
I've think I've got the forwards direction: If $A,B$ are similar then by definition there is an invertible matrix $P$ such that $A = P^{-1}BP$, so $A$ and $B$ are equivalent.
For the other direction where we suppose that $A$ and $B$ are equivalent: I noted that since $A,B$ are idempotent they are diagonalizable with eigenvalues $0,1$. However, I don't really think this helps much.
I'm not sure how to proceed.