Here is the best way to update, IMO. I just did it and it worked without a
hitch.
1. Add to /etc/apt/sources.list one of the following repositories depending on
your installed Ubuntu version.
deb http://download.virtualbox.org/virtualbox/debian lucid non-free (10.04)
deb http://download.virtualbox.org/virtualbox/debian karmic non-free
deb http://download.virtualbox.org/virtualbox/debian jaunty non-free
deb http://download.virtualbox.org/virtualbox/debian intrepid non-free
deb http://download.virtualbox.org/virtualbox/debian hardy non-free
deb http://download.virtualbox.org/virtualbox/debian lenny non-free
deb http://download.virtualbox.org/virtualbox/debian etch non-free
2. Open a CLI and type sudo apt-get update <Enter>
3. Back up /home/<yourusername>/.VirtualBox
4. Open System->Administration->Synaptic
5. In search box type virtualbox
6. Select and install virtualbox-3.2 - The previous version will be removed and
the new version installed.
When you next start Windows XP, you will be prompted to update Guest Additions,
if you have it installed. Just follow the prompts.
This information came from http://www.virtualbox.org/wiki/Linux_Downloads