(d) 3
When a number is divisible by 3, the sum of the digits must also be divisible by 3.
This sum is divisible by 3 if x+y+12 is 12 or 15.
For x+y+12 = 12:
x+y=0
But x+y cannot be 0 because then x and y both will have to be 0.
Since x is the first digit, it cannot be 0.
∴ x+y+12 = 15
or x+y = 15-12=3