As you say the sum of the two numbers is 32769
Since The maximum positive number a short can hold is 32767 then you can't put it into a short (only int and above).
Now let's look at what happens in each case:
int x=a+b => Here you just get 32769 like you noticed because thats the sum of the numbers.
int x=(short)a+b => here you still get 32769 but because of the cast to short we only look at the lower 15 bits which have only 1 in them, so we get 1.
For more info look into this url:
here