You need to attach your variables to the 'handles' structure in each callback. So, in one callback:
handles.x = 3;
handles.y = 2;
guidata( hObject, handles );
Don't forget that last line - it is what commits the handles structure back to the GUI, otherwise changes to it are local to the callback and will be lost.
Then in any other callback you can just do:
z = handles.x + handles.y;
Obviously if you also want z elsewhere put that on handles too with the guidata line also.