Oh bleh! Of course this one won't be so simple! Sorry, I didn't think far enough ahead
Did you notice that you haven't used the fact A and B are square matrices? That is a crucial assumption, so you will not be able to do the problem unless you use it in some way.
Incidentally, the work you did is still valuable: when you know that AB = I, we say that B is a right inverse of A, and that A is a left inverse of B. (So, the inverse of a matrix A is simply something that is both a right and a left inverse of A)
Left and right inverses can be important when working with nonsquare matrices. For example, you might want to solve the equation Ax=y, but A is not a squrae matrix! Fortunately, if A is left invertible, you could just multiply by one of its left inverses (say, B) and get x=By.
(An example is when solving a system of linear equations when you have more unknowns than equations. Typically, the coefficient matrix is left-invertible. You will probably not be taught to think of it this way, though!)
Bleh, then all the ways I know to do this problem involve something that isn't completely trivial. The most straightforward is with determinants. (If you've learned them)
While you don't have a theorem that AB = CB --> A = C, you do have the following:
If Av = Bv for every vector v, then A = B. (Similarly, if AC = BC for every matrix C, then A = B)
Also, if A is a non-invertible square matrix, then Av=0 has a nontrivial solution. You could probably use that to do this problem too.