So can you show me where the mormon church teaches this?
We simply have to look at the two different situations.
Giving the Gift of the Holy Ghost is called a conformation. The Priesthood holder will lay these hands upon the head of the person who has been baptized and calls them by name and then say;
"In the name of Jesus Christ, and by the authority of the holy Melchizedek Priesthood, I confirm you a member of The Church of Jesus Christ of Latter-day Saints and say unto you, 'receive the Holy Ghost.'"
They will then give further blessings as the Holy Spirit moves them.
The priesthood ordination is similar and is only given to men, I got these instructions from the “official” Handbook 2: Administering the Church
“To perform a priesthood ordination, one or more authorized priesthood holders place their hands lightly on the person’s head. Then the priesthood holder who performs the ordination”
1. Calls the person by his full name.
2. States the authority by which the ordination is performed (Aaronic or Melchizedek Priesthood).
3. Confers the Aaronic or Melchizedek Priesthood, unless it has already been conferred.
4. Ordains the person to an office in the Aaronic or Melchizedek Priesthood and bestows the rights, powers, and authority of that office.
5. Gives words of blessing as the Spirit directs.
6. Closes in the name of Jesus Christ.
One is giving the Gift of the Holy Ghost and the other the Priesthood.
*Now I’m going to give you more than you asked for.
On April 28th 1842 Eliza R. Snow recorded in her min. of the RS;
"he (Joseph) spoke of delivering the keys of the priesthood to the church, and said that faithful members of the Relief Society should
receive them in connection with their husbands…"
Woodruff a close friend of the prophet said;
"Is it possible that we have the holy priesthood and our wives have none of it? Joseph desired to confer these keys of power upon them in connections with their husbands
a wife has certain blessings and powers and rights and is a partaker of certain gifts and blessings and promises with her husband"
Brigham Young
"[they] never can hold the Priesthood apart from their husbands"
Mary Kimball asked her husband Heber Kimball about women giving blessings to the sick, (which Joseph said was done through faith)
"..not by authority of the priesthood invested in them for that authority is not given to woman they might administer by the authority given to their husbands in as much as they were one with their husband."
John Taylor
"…it is not the calling of these sisters to hold the Priesthood,
only in connection with their husbands, they being one with their husbands."
This is in line with Peter saying;
1Peter 3: 7 Likewise, ye husbands, dwell with them according to knowledge, …..and as being heirs together of the grace of life; that your prayers be not hindered.
At one time years ago and late at night we were driving over Donner Pass which is at 7,056 ft. My baby daughter was screaming and pulling on her ear. We pulled over and with my husband we both laid our hands on her and with the power of the priesthood which he held we blessed her. Almost immediately she stopped screaming and then went to sleep. The next morning we found a doctor, her ear drum had popped, we got her some medicine. We were acting as one in this blessing.
Now that is not often done, we general follow the guidelines set down by James
James 5:14
14 Is any sick among you? let him call for the elders of the church; and let them pray over him, anointing him with oil in the name of the Lord: