What is the end of this cable?

Solution 1:

B-end is a Lenovo-specific 7-pin PS/2 connector, which you connect straight to Lenovo motherboard. See 3rd image from this auction for the details:

http://www.ebay.com/itm/Lenovo-ThinkStation-ThinkCentre-FRU-43N9149-PS-2-Keyboard-Mouse-Cable-/251535857927

Solution 2:

This 7-pin connector goes to a header on a Lenovo motherboard marked KB/MS (keyboard/mouse), specifically for interfacing the motherboard to PS/2 ports.

The header

According to the Lenovo forums, the pinout is as follows:

/-------\
|4|3|2|1|
| |7|6|5|
\-------/

Pin 1 - 5V
Pin 2 - CLK
Pin 3 - Data  [5V]
Pin 4 - GND
Pin 5 - 3.3V
Pin 6 - GND (noisy)
Pin 7 - Data  [5V]

There is no official spec available.

Solution 3:

It is the keyboard / mouse port for the computer. Yes, port B connects directly to the motherboard. Depending on the age of the computer, it could either connect to a USB connector or to serial controllers for the keyboard and mouse.