See Roland's image of how each pin is connected.
(This image is from http://www.rolanddg.co.jp/support/3d/modela/FAQ_mdx1520.html#37991
9 pin is female and 25 pin is male. This is why the order of pin numbers is opposite to each other.
These images are connection side(face), not soldered side(back).
Solder wires according to the image.
The upper one is 25 pin and the lower one is 9pin.
Pin1 of 25 pin and Pin9 of 9 pin are not connected to any pin.
Pin20 of 25 pin and Pin4 of 9 pin should be connected to 2 wires, it will make soldering easier to put the 2 wires inside the pin hole firstly, then solder them.