Your answer to that he knew what salat was is he already knew how to perform a ritual namaz prayer.
He had no revelation other than the Quran which does not say how to do this so your argument is false.
He did not get it from Abraham because the Quran does not say how Abraham was supposed to do this namaz so we cannot confirm it from this example. If the Quran had said to Abraham this is how you should perform the salat and put the instructions for him, then we can accept the Messenger knew the namaz from Abraham because the Quran confirms its form; but it does not do this.
Quran says do not follow our ancestors, only follow Quran and the only honest answer for namaz is that we got it from our ancestors.
You are beating around the bush with you distortion of the Quran, looking for two non existent birds by taking the idiom literally. Good hunting.