Change the order of the eigenvalues and eigenvectors?

I have two matrices A and B. They have the same eigenvectors, but different eigenvalues. I would like that after a reordering the eigenvalues of the two matrices correspond to the same order of eigenvectors. For convenience, I attached a .nb file, where I explain better what I need. Thanks in advance for any help!

Order_vals_AMP_vecs.nb (22.3 KB)

You can store the positions of the unit vectors in the eigensystems in a list, and then reorder eigenvalues and eigenvectors according to the position list:

posTableA = 
 Flatten@Table[Position[vecsA, N@UnitVector[8, i]], {i, 8}]
valsA[[posTableA]] == newvalsA
vecsA[[posTableA]] == newvecsA
posTableB = Flatten@Table[Position[vecsB, UnitVector[8, i]], {i, 8}]
valsB[[posTableB]] == newvalsB
vecsB[[posTableB]] == newvecsB

Many thanks! It works!