Hyperscience Interview Question

Problem regarding anagrams