I do not think simultaneously diagonalizable matters in procedure of getting eigenvectors of A and B for each.
As examples in QM, x coordinate operator X and y coordinate operator Y are simultaneously diagonarizable.
[tex]XY=YX[/tex]
X has eigenvectors of {|x>}. Y has eigenvectors of {|y>}.
[tex]XX^2=X^2X[/tex]
X^2 has denenerated eigenbectors of |x> and |-x> for eigenvalue x^2
Then KM=MK. M=K+2I where I is identity matrix. Diagonalization of K by product of unitary matrix ##P, P^{-1}## would also diagonalize M. Why don't you try to get it ?