The Savvy Cyclist is right, a hanger alignment tool is the best way to straighten the hanger. For some bikes, like yours, a hanger alignment tool won't work.
For bikes that have derailleurs that can't be removed from the hanger, or for inexpensive derailleurs you can bend it by hand and eyeball if it's straight.
The key to eyeball straightening is knowing what you are comparing to for straightness.
In your picture - you want the red line - the derailleur hangar - to be parallel to the green line - the drop out.
Grip the derailleur cage so that you can apply force such that the derailleur hanger will bend in the right place.
The red arrow indicates where force will need to be applied
In some cases I've used a large adjustable wrench to grab the hanger bolt (or hanger rivet in this case) and apply force on the hanger.
It takes some experimentation, but it can be done. Start by bending a little, checking, and repeat.
If the derailleur hanger is bent and it is not possible to separate it from the derailleur, it may be difficult to straighten it without causing further damage. If you are not confident in your ability to repair the hanger, it is recommended to take it to a bike shop for repair. The shop should be able to straighten the hanger or replace the entire derailleur if necessary.
If you are comfortable with attempting the repair yourself, you will need to use a hanger alignment tool or a flat surface such as a workbench to straighten the hanger. First, remove the wheel and derailleur from the bike. Then, place the hanger on the alignment tool or flat surface and gently apply pressure to the bent area until it is straight. Be sure to use caution and apply pressure slowly and evenly to avoid causing further damage to the hanger or derailleur. Once the hanger is straight, reattach the derailleur and wheel to the bike and test the shifting to ensure it is functioning properly.