The correct answer to this question is D. It was Al-Khwarizmi who is typically credited with developing algebra, or at least with writing the first known book on the subject. He did this in the 9th century CE. It is from his name that we get the term “algorithm.”
Option A cannot be correct. This is because Ptolemy was not Muslim. He lived before Islam even came into being. Ptolemy is noted for his contributions to understanding the solar system and astronomy.
Option B is not correct. Avicenna was a Muslim, but he is much better known for his works on medical science than for his work in mathematics.
Option C is not correct. Ibn Khaldun was also Muslim, but he was not a mathematician. Instead, he was a social scientist of sorts. He was interested in history and economics and other such subjects.
Therefore, Option D is the only correct answer to this question.