If I understand you correctly you produced the characters in the second line by typing letters Q-P followed by A-L and then Z-M.
If that's a yes, then here's a table for what you press and what you get, assuming I interpreted your input correctly.
Code:
Q=R W=R E=Y R=Y T=I Y=I U=P I=P O=^ P=<
A=F S=F D=H F=H G=K H=K J=: K=: L=V
Z=V X=V C=N V=N B=, N=, M=? <=?
We can see from this that pressing either of the first two letters in a row generates the fourth letter in the row
Code:
Q, W =R
A, S =F
Z, X =V
Pressing either of the third or fourth letters on a row generates the sixth letter in the row
Code:
E, R = Y
D, F = H
C, V = N
Pressing either of the fifth and sixth letters on a row generates the eighth letter / character in the row
Code:
T, Y = I
G, H = K
B, N = ,
So there's a definite pattern to this.
It would be helpful to have the exact circuit diagram for the Pet 3000 series keyboard section, but in the meantime, as you have already tried replacing all the 'big' ICs associated with the keyboard, try to see if there is a 'four line to more lines' decoder between the I/O IC and the keyboard and if you can, change that, as you may as well rule that out before going further - assuming it's in a socket and is easy to change of course.
Some good pictures of that area of the PCB may help us to make further suggestions / compare it with any info which can be found online.