Morgan Stanley interview question

Question on anagrams. Rewording strings in the most efficient way