Are the medicines used in treating trans patients similar to those used for Hormone Replacement Therapy?

Yes. Gender-affirming hormones are the sex hormones that your body needs. If your own body can’t produce them (because you have gone through the menopause for example, or if you are transgender) then they can be given as medicines.