It is hard to tame rex due to having a partner or other creatures that might aggro on you or the rex itself. Especially the rex itself will aggro on the creature too. So all you need is a rideable creature to run around it and shoot tranq arrows with a cross bow and feed it prime or mutton if you can get a hold of a ovis.
The Rex are very slow . Put a stone gates around him while he is stuck and use a bear trap then put the x3-x4 stone gates then tranq him out . Make sure you clear the area before setting the bear traps others creature can spring it and u would be left with using your self or a tanky dino for a distraction
If you use the bear trap strategy which is if you lead it into a Dino gateway that is shaped in a triangle and with a bear trap in the middle (Large Beartrap) and when it is stuck you must put a dinogate behind it to trap it and then knock out.