This was the two pieces before I started.
The first step was to remove the plastic remainder of the hinge from the metal part. I had to drill out the rivets and they came apart. I didn't use the plastic part at all.
Then I cut off a piece of the new hinge with a dremel and cut off wheel. No pics of that process but here is pic of the two side by side and a marking of where I cut. looking back I would have made the metal hinge about 1/2" shorter on each side but keeping the holes centered.
Here is the replacement hinge on top of where it's going to mount. Notice the pivot point is on the bottom in an effort to keep the hinge pivoting as close to the original location. If it was oriented 180 deg then then pivot would be up higher.
I then cut off excess plastic from the bottom of the door where the broken hinge made an uneven surface and it also helped to get the pivot point closer to where the plastic bend took place.
Next I mounted the new hinge to the metal piece. I used 3/16" X 5mm aluminum rivets. I ground off the tops of the rivets with dremel so they didn't stick out as much. No picture of how much I ground off though.
In this pic you can see the hinge mounted to the metal bracket and sitting on the door. I used a scribe to mark the location for the holes to be drilled in the door. Be careful to only drill through the top metal part. If you are not careful you can drill through the front of your door.
Here is a pic with the holes marked and the hinge assembly removed. You can see how close they are to the edge of the metal frame. If I would have used hinges shorter than 1 1/2" it wouldn't reach. The idea is to keep the pivot point as close to where the plastic joint was located.
In the picture above I noticed the hinge assy was upside down from how you need to mount it. Hinge joint is on top here and it must be mounted hinge joint side down.