I believe that is an incorrect statement. Prophet Muhammad was a Prophet since he was born, since even before he was born in fact. Allah had communicated about Rasul and his ummah with other Prophets . Rasulullah was, by the grace of Allah swt, the answer to Prophet Ibrahim's supplication. He was not notified about his prophethood until he was around 40 years old. There's a difference between not being, and not knowing. For example, if a person does not know his biological parents growing up, and he thinks/is told that he is 100% Pakistani, so he grows up thinking that. However, much later on in life he finds out that in fact one of his parents was Arab and the other was Pakistani, so he is 50% Pakistani and 50% Arab (just for the sake of the example). That doesn't mean that he just "became" part Arab, rather he was always part Arab but just didn't know. Insha'Allah I will be corrected if I am wrong here. Allah knows best.