Upvote:2
It has become excessively hard to buy a prepaid SIM card in China. So buying it in HK is wise. However, since China and HK do not share a common telecoms system, you will need to buy either a SIM card that can work in both China and HK (China Unicom sells them), or a "normal" prepaid card in HK for HK, and another prepaid SIM card specifically for China.
Both China Unicom and Peoples (China Mobile) have them. Avoid 3HK, they're bandits.
Also, whatever you decide to do, try not to buy at the airport but wait until you reach downtown, and visit a regular China Mobile/China Unicom shop. You'll have more options, and prices will be less demented.
Also, you'll need a VPN. Only non-Chinese post-paid SIM cards offer, sometimes a modicum of VPN-ish behaviour. Prepaid cards sold by the HK subsidiaries of Chinese telcos will obey the law and your connection will be filtered.