The correct answer is A. Mahmud of Ghazni.
Al-Biruni was a Persian polymath who was born in Khwarazm (now Uzbekistan) in 973 CE. He was a mathematician, astronomer, geographer, historian, alchemist, and linguist. He is best known for his work on India, which he visited in the early 11th century.
Al-Biruni came to India with Mahmud of Ghazni, a Turkic ruler who invaded India several times between 1001 and 1027 CE. Mahmud was a great patron of learning, and he invited al-Biruni to accompany him on his campaigns. Al-Biruni spent several years in India, and he wrote extensively about the country’s history, culture, and religion.
Al-Biruni’s work on India is a valuable source of information about the country in the 11th century. He was the first Muslim scholar to write a comprehensive account of India, and his work was highly influential in the Islamic world.
The other options are incorrect. Alexander the Great invaded India in the 4th century BCE, Babur invaded India in the 16th century CE, and Tamerlane invaded India in the 14th century CE. None of these rulers brought al-Biruni to India.