
Just as a single-word name is permitted, a compound name made up of more than one word is also permitted, provided its meaning is sound. However, a single-word name is preferable. In the case you have asked about, the better option is to choose one name, either Ali (علی) or Muawiyah (معاویہ). That said, using both names together as Ali Muawiyah is also permissible.
As for names taken from the names of the Sahabah (may Allah be pleased with them all), there is no need to investigate their meanings. If any of these names had a problematic meaning, the Prophet ﷺ would have changed it. Since he ﷺ did not change them, this is itself proof that such names are sound and permissible to use.
Allah the Almighty knows best.
Darul Ifta Al-Ikhlas, Karachi.
تحفة المودود بأحكام المولود: (ص: 144، ط: مكتبة دار البيان)
لما كان المقصود بالاسم التعريف والتمييز وكان الاسم الواحد كافيا في ذلك كان الاقتصار عليه أولى ويجوز التسمية بأكثر من اسم واحد كما يوضع له اسم وكنية ولقب.
الفقه الاسلامی و ادلته: (2753/4، ط: دار الفکر)
ويجوز التسمية بأكثر من اسم واحد، والاقتصار على اسم واحد أولى، لفعله صلّى الله عليه وسلم بأولاده.