You probably need to find a friend who has a copy of Windows 8.1 that you could use to reinstall. You may also be able to contact Microsoft or HP support to purchase a DVD. You could also hit up one of your local IT companies to have them reinstall the OS using there disk.
I'm guessing you destroyed the recovery partition when you went and installed Ubuntu, correct?