First, find a pattern in the relationship between the two numbers in each set:
16 = 6, 1 + 5 = 6, 1^n6 = 6
212 = 24, 2 + 22 = 24, 2^26, 2^33 = 24
318 = 54, 3 + 52 = 54, 3^26 = 54, 3^32 = 54
Sorting through the possible relationships reveals that in each case the first value in (x,y) relates to the second by the equation x^2*6 = y