Thanks for the photos.
Can you remove the PS/2 cable and solder three wires to each potentiometer ?
Do you have a multimeter to measure the value of the potentiometers ?
The link that you gave in your first post shows how to connect the potentiometers.
One side of the potentiometer to 5V, the other side to GND, and the middle to an analog input.
You can combine the 5V and GND, so you need a cable with 4 wires and you need two analog inputs.