Praise be to Allaah.
These ahaadeeth are in harmony with one another; they do not contradict one another. The first thing that Allaah created of the things that are known to us was His Throne, which He rose over after He created the heavens, as Allaah says (interpretation of the meaning):
“And He it is Who has created the heavens and the earth in six Days and His Throne was on the water, that He might try you, which of you is the best in deeds” [Hood 11:7]
With regard to the Pen, there is nothing in the hadeeth to indicate that the Pen was the first thing created. What the hadeeth means is that when Allaah created the Pen, He commanded it to write, so it wrote down the decrees of all things.
With regard to Muhammad (peace and blessings of Allaah be upon him), like all other human beings, he was created from the water (semen) of his father, ‘Abd-Allaah ibn ‘Abd al-Muttalib. He is no different from other human beings in the manner in which he was created, as he said about himself, “I am a human being, I forget as you forget.” He (peace and blessings of Allaah be upon him) felt fear, got thirsty, felt cold, suffered from the heat, got sick and died. Everything that humans go through as a part of human nature, he also went through, but he is distinguished by the fact that he received Revelation and he was qualified to bear the Message, as Allaah says (interpretation of the meaning):
“Allaah knows best with whom to place His Message” [al-An’aam 6:124]