Answer is 973.
Let’s see the first set of values.
12, 19 and output is 277.
19^2 = 361.
361 - 277 = 84
84/12 = 7 = 19–12.
Second set
(6, 28) and out put is 652.
28^2 = 784
784 - 652 = 132
132/6 = 22 = 28–6.
Similarly for other sets.
Let me try it in general form.
Input is (I1, I2 ) where I1< I2 and ouput is O.
Then
(I2)^2 - O = I1 * ( I2 - I1)
So
O = (I2)^2 + (I1)^2 - I1*I2
For (17, 36)
O = (17)^2 + (36)^2 - (17)(36) = 973.