Hello! My name is*****I am a certified computer professional who will assist you with the problem you described.Based on the problem description, it seems that the attempted Windows 7 installation has overwritten or corrupted the master boot record, which would explain why the Windows 8.1 boot selection doesn't work anymore. For that reason, I suggest repairing the Windows 8.1 boot selection.
To do that, you need to use a Windows 8/8.1 disc. Insert it into the computer and boot from it. Select the language, click Next, and then click on "Repair your computer". Click on "Troubleshoot" and then "Advanced options". There click on "Startup Repair". The computer will restart and automatically fix the startup entries for Windows 8.1. After that, check if you can boot to Windows 8.1 as before.
In case it didn't work, try with the "System Restore" option instead. Choose any restore point that was created before you attempted to install Windows 7.
Let me know the results.Regards,IT Miro