How do I mount this towel rack that was ripped off the wall?
The traditional solution for a pulled out towel rack is to remove the towel rack, patch the holes (usu two on each end) and place the rack slightly higher or lower. An experienced or inventive person can patch the existing hole and, by adding reinforcement, remount in the same location.

These racks are secured to a pair of metal brackets on the wall with the rack fastened to the brackets by small screws on the undersides. To repair it loosen or remove the screws underneath and then lift the rack off. Then deal with remounting on the side that pulled out. 

Oftentimes the original installation was inferior and damaged the drywall, leading to premature failure. The traditional mounting for a towel rack is plastic anchors which require drilling a small hole (3/8" dia or less) in the drywall.

Newer anchors don't require drilling. These have a sharp end that can be forced into the drywall and then plastic threads which pull the anchor into the drywall when twisted. The metal screw for the bracket is screwed into the center of the plastic anchor.

However, in this situation you have a large hole which invites a possible quick repair with one of the new Wingit type anchors intended for grab bars. This might or might not work, but I for one would consider it. The Wingit screw has a rather large head and you'd need to be sure that the existing brackets would accept that.

If I were installing towel racks in a rental property I would consider the Wingits towel bars. I happen to think that tubs and showers should be fitted with grab bars even without elderly or disabled users. Stepping into a tub has some risk. The shower may have been turned on but is not up to temperature and the person steps in quickly and off balance to avoid cold spray. At the very least have an 18" or 24" vertical bar at the entrance to the tub and a long (36", 42", 48") bar horizontal on the long wall.

 Base level Wingit requires 3/4" diameter hole

If I were going to use a Wingit for a towel bar, I would plan on using only one per side because of the hole spacing on the standard towel bar. The recommended drill bit is the Wingit Apache200 carbide 3/4" drill bit, but anything that will cut a 3/4" hole in the wall should work. I can imagine trying the tip of a drywall saw if I had to (but would probably regret that).

EDIT The following type of drywall anchor works amazingly well and requires no power tools for installation. It does work in undamaged drywall. Screw-in plastic drywall anchors

One product for a drywall repair is shown here: Insta-Back Drywall Repair kit