Mohammed was very familiar with the Torah, and the Christian Bible. Not surprising that he would co-opt both to create his own religion.