what is the book of allahs teaching written by muhammad in mecca

The book you are referring to is the Qur'an. It is the holy book of Islam, believed by Muslims to be the exact word of God as revealed to the Prophet Muhammad through the angel Gabriel. The Qur'an was revealed to Muhammad over a period of approximately 23 years, starting in 610 CE in Mecca and ending in 632 CE in Medina. It contains guidance on various aspects of life, including moral and ethical values, worship, laws, and spiritual teachings.