It is narrated from Sayyida Aisha's (may Allah be pleased with her) brother Tufail that a man from among the polytheists said to a Muslim: "You people are very good, if only you would not say 'Whatever Allah wills and whatever Muhammad wills,' that is, do not say that whatever Allah wills and Muhammad wills." When the Prophet (peace and blessings be upon him) heard this, he said: "Do not say 'Whatever Allah wills and Muhammad wills,' rather say: 'Whatever Allah wills, then Muhammad also wills.'"
Hadith Referenceسنن دارمي / من كتاب الاستئذان / 2734
In some narrations, it is stated that you should only say: «ماشاء اللّٰه», Allah wills whatever He wills.
Every matter in the world occurs by the will (mashiyyah) of Allah; in this, the will of any individual or human being has no role. Therefore, combining the will of the Creator and the creation is contrary to tawhid (monotheism), that is, saying "if Allah wills and so-and-so wills" is not permissible in any way.
Imam al-Nasa'i rahimahullah has narrated with a sound chain that a Jew said: "You people commit shirk (associating partners with Allah); you say, 'Whatever Allah wills and you (sallallahu alayhi wa sallam) will.'"
In another narration, it is mentioned that a person said: «ماشاء اللّٰه وشئت» "Whatever Allah wills and you will."
The Prophet sallallahu alayhi wa sallam said: "You have made me a partner with Allah.
Only say: «ماشاء اللّٰه وحده» (Whatever Allah alone wills)."