Welcome to the Community - What you describe is very achievable - one correction is ESXi si installed on the bare metal so it will over write the existing installation of XP - if you want to maintain the XP installtion you might look at one of the hosted products like VMware Player or Workstation which will install ontop of the existing XP operatings system -
ESXi also will work as long as the hardware is supported you will be able to install ESXi on the pc and create two VMs with XP -