If A were a knight, he should be telling the truth, which is that he and all his family are knaves, and this would be absurd since A should be a knight. Therefore A must be a knave. Since he lies, this means that it’s not true that in his family they are not all knaves: in his family there is at least a knight.