Two faint X-ray pulsars, AX J2725 and AX J2733, located in the direction of the Galactic Centre, were studied in detail using data from the INTEGRAL, XMM- Newton and Chandra observatories in X-rays, the SOFI/NTT instrument in the infrared and the RTT150 telescope in the optical. X-ray positions of both sources were determined with an uncertainty better than arcsec, which allowed us to identify their infrared counterparts. From the subsequent analysis of infrared and optical data, we conclude that the counterparts of both pulsars are likely to be massive stars of B0-B3 class located behind the Galactic Centre at distances of 12-20 kpc, depending on the type, probably in the further parts of the Galactic spiral arms. In addition, we investigated the extinction law towards the Galactic bulge and found that it is significantly different from the standard one. [ABSTRACT FROM AUTHOR]