Note that $A$ saying that "$A$ is a knight" gives you no information at all: both a knight and a knave would claim themselves to be a knight.
So, all you effectively have to work with is $B$ saying that $A$ is a knave. Which has exactly the two solutions you mention: either $B$ is a knight and thus $A$ is indeed a knave, or $B$ is a knave and thus $A$ is a knight.
If you want to to this a bit more formal, note that we can nicely use biconditionals with these kinds of Knights and Knaves puzzles: one is a knight if and only if what they are saying is true.
Thus, if we use $A$ to represent the claim that "$A$ is knight", then $A$ saying that "$A$ is a knight" can be symbolized as $A \leftrightarrow A$ ... which is a tautology ... and thus, as pointed out above, effectively says nothing at all.
$B$ saying that $A$ is a knave becomes $B \leftrightarrow \neg A$ ... and if you have any experience with the logical operators at all, you know that that simply means that $A$ and $B$ have different truth-values, i.e. that the persons $A$ and $B$ are of opposite types.