I would likely stick with PHP 8.0.x but 8.1 should be fine for 1.17 too.
In order to avoid the internal server 500 error you may want to disable all your plugins before the upgrade as there is a good chance it is a plugin which is causing the error. Certainly you will need the latest versions of the plugins obtained from the OsTicket.com / download website too, these are the most up to date and need to be updated along with the source code when changing to 1.17.
It is usually possible to find the cause of the internal server 500 errors as they usually shows up in either your web server or PHP logs.
Your screenshot is showing when you have PHP 7.3.6 installed, OsTicket 1.17 will never work with version of PHP.