I assume it is a controlled substance for medical not recreational use. If the travel partner absolutely cannot use a non-controlled substitute during the travel period, then I'd suggest minimizing the number of pills or whatever to the bare minimum needed to get through travel and back home, in the original prescription container, with a doctor's note kept handy in the carry-on luggage. Never in quantities that would imply resale. Don't declare or anything else. It is highly unlikely that he will be stopped and searched, but in the event it is questioned, remaining polite and explaining and showing doctor note (even in English) will probably get him through. It is even more unlikely that there would be any consequences other than confiscation. Plenty of foreigners travel through Chinese airports and China with personal medication obtained abroad, that is either not legal or strictly controlled inside China. Usually it's a don't ask, don't tell situation.