Neither of $X,Y$ can be zero, because
$0\times Y=0$ for any $Y$, so the last digit of the product is always zero and could never have allowed Jack to determine the non-zero number. One could also argue that Jack's pen would not cost zero dollars.
So we can assume $X,Y$ are both non-zero digits. The following is true:
$X\times Y$ has the same last digit as $(10-X)\times (10-Y)$
For example $3\times4=12$ has the same last digit as $7\times6=42$.
The above relation therefore shows that there will remain at least two possibilities for $X,Y$ unless
$\{X,Y\}$ is actually the same pair of numbers as $\{10-X,10-Y\}$.
From this it follows that the sum of $X$ and $Y$ is
$X+Y=10$
This doesn't actually show that the situation described in the question can actually happen, so I should verify that there are actual values for which it could work:
$1\times9=9$, $2\times8=16$, $3\times7=21$, $4\times6=24$.
Obviously $1\times4$ and $1\times6$ are alternative ways to get a final digit of $4$ or $6$, so knowing that the product has last digit $4$ or $6$ does not provide Jack with a unique set of values for $X,Y$. Maybe a last digit of $1$ or $9$ will.
The only products of single digits ending in $1$ are $1\times1$, $3\times7$, and $9\times9$. Since the factors need to be different, $\{3,7\}$ would work as a unique answer when the price of Jack's pen is 1 dollar.
The only products of single digits ending in $9$ are $1\times9$, $3\times3$, and $7\times7$. Since the factors need to be different, $\{1,9\}$ would also work as a unique answer when the price of Jack's pen is 9 dollars.
We don't know which of the two possibilities is correct, but the sum is $10$ regardless.
Edit:
The above assumes that the numbers involved are not negative. There are single-digit negative numbers too of course. However, if negative numbers are allowed then the dialogue described in the question could not have occurred, as for every pair of single-digit numbers $X,Y$ there is a different pair of single-digit numbers $-X,-Y$ that give the same product. For the dialog to have occurred, the participants (or at least Jack) must have assumed or understood that negative numbers are not allowed, so we can make the same assumption when solving the puzzle.