How to reduce taxes on Travel Expenses to home country and PTO Payout?

In 2023, I was on H-1B work visa (resident alien for tax purposes for last 4 years). I lost my job in August 2023 and moved out of the USA. The employer paid out my accrued PTOs (a huge amount) and $2000 for travel expenses to my home country. Travel expenses are legally required by USCIS to enable H-1B holders to relocate to home country.

 

These two payments (PTO + travel expenses) are taxed heavily. How can I reduce my taxes on these? 

 

I lived in NJ. Worked in NY.