First create a list of prime numbers 1 to 22.
The list is 2, 3, 5, 7, 11, 13, 17, 19.
Now we know that one number is a prime number and one is a square number.
So, the list of square numbers from 1 to 22 are 2, 4, 6, 8, 9, 10, 12, 14, 16, 18, 20 and 22.
Which number among the above numbers is a square number?
4 and 9.
Now check from the list of 2, 3, 5, 7, 11, 13, 17, 19 and 4 and 9 adds up to 22.
Answer is 9 and 13