So you make two equations:
x+y=3 because their sum is 3
x-y=21 because their difference is 21
now you have to solve one equation, I'll use the first one
x=3-y
plug in this x into the other equation
x-y=21
(3-y)-y=21
3-2y=21
-2y=18
y=-9
now solve for the other number
x-9=3
x=12
your numbers would be 12 and -9