permanent residence

Wondering how can we apply to be hong kong permanent resident?

It's pretty simple

There are some easy steps:

1 - live in Hong Kong for 7 continuous years legally;
(Note that if you end up in jail, it does not count towards your period of residency. In fact, if it's longer than about three months, you may have to start your accumulation of seven years again when you get out!)
2 - accumulate evidence of this: a mortgage is superb, tax bills are good, but utility bills, rental receipts, etc are ok too;
3 - go to Immigration tower and get the forms for right of abode (NOTE: *not* the forms for a permanent ID card - you'll get that later as a matter of course);
4 - apply for right of abode;
5 - be prepared to argue your case for permanent residency with an immigration officer;
(I didn't have to do this, but I turned up for the interview with my Chinese wife and my two Cantonese speaking kids, and had the aforementioned mortgage. Some friends with non-Chinese wives/girlfriends have reported a more serious interrogation.)
6 - wait with bated breath.
7 - collect your right of abode documents and apply for a permanent ID card.
8 - Realize that you are now entitled to wander the streets of Hong Kong drinking San Miguel beer from a tin with a straw. Oh, and you are entitled to vote too, although you have to register for that separately.

Once you have a HK PID, you're almost certainly eligible for a long China visa, if that's useful to you. If you've got a decent travel agent or company secretary, you should be able to get a one to three year visa, depending on your passport. I can normally get a three year China visa for HK$900, but I have an Irish passport. USA or UK passport holders will probably have to pay more.