It is narrated from Sayyiduna Hanzalah al-Katib (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) sent Sayyiduna Ali bin Abi Talib and Sayyiduna Khalid bin al-Walid (may Allah be pleased with them both) to Yemen and said: "When you are together, Ali will be the commander; and when you are apart, each of you will be responsible for his own task." Sayyiduna Khalid bin al-Walid (may Allah be pleased with him) wrote a letter to the Prophet (peace and blessings be upon him) and put his own name first, and he ((peace and blessings be upon him)) did not object to that. And Sayyiduna Ali (may Allah be pleased with him) wrote a letter to the Prophet (peace and blessings be upon him) and put the name of the Prophet (peace and blessings be upon him) first.
Hadith Referenceالمعجم الكبير للطبراني / باب الحاء / 3483