You will need to have a partition or at least the space for a partition in which to install XP. Also, you will have to make sure that the Windows partitions are Primary rather than extended/logical partitions.
I assume that when you installed Ubuntu, then you already had Windows 7 installed beforehand. As it installed, Ubuntu will have installed the Grub loader with its own menu system, and with Windows 7 configured as a boot option.
These are the steps I used to install XP, and subsequently Windows 98 on to a disk with several Linux already installed. (Note: unlike Windows, Linux is quite happy running from an extended/logical partition.)
1. Boot Ubuntu.
2. In a terminal window, run the command:
sudo fdisk /dev/sda
Enter 'p' then return, and then 'q' and return (without the quotes). The fdisk command should allow you to determine the number of sectors per track on the disk.
3. Next run the command:
sudo dd count=n if=/dev/sda of=/track1
where n is the number of sectors per track. This is often 63, but might be different depending the on the disk.
4. Install XP on the partition you have reserved for it. Note: after installing XP, the menu will have disappeared, and it will seem that you only have XP installed.
5. Boot and run Ubuntu from a live CD. Mount the partition that has your Ubuntu installation. Then open a terminal session and cd into the root of your Ubuntu partition.
6. Run the command:
sudo dd if=track1 of=/dev/sda
This should restore the first track to its original contents.
7. Reboot from the hard disk. You should now have your menu with Windows 7 and Ubuntu options available.
8. In Ubuntu, you will have to configure the Grub bootstrap to include XP in the menu.
Unfortunately, Ubuntu 12.04 uses Grub 2, and I have not mastered configuring this version of Grub. When I installed my operating systems, I installed Damn Small Linux first, and this uses the earlier version of Grub (now called Grub Legacy). This uses a different configuration file structure.
Grub 2 is well documented on the Internet, and I suggest you browse for the correct way to add XP into the boot options.
Before making any changes, it is a good idea to back up any important personal files.