1) As a HK Chinese citizen dual nationality is tolerated provided that you don't explicitly declare a change of nationality to ImmD.
2) As a HK Chinese citizen you should not have entered HK on a foreign passport. This gives ImmD the understanding that you do not regard yourself as HK Chinese. It might be taken as equivalent to having declared a change of nationality. Hence the Immigration officer's comment.
3) As a US citizen you MUST (on pain of penalty) enter and leave the US using your US passport.
4) Your best course now to get the HKSAR passport is to leave HK on your US passport, then re-enter using your HKID. (Go to Macau or Shenzhen). If they allow you to re-enter then I guess you can take that as meaning that ImmD doesn't regard you as having renounced your Chinese citizenship. You can then proceed to apply for the HKSAR passport. DO NOT use it to enter the US!
5) If ImmD decides that by entering HK on your US passport you have renounced your Chinese citizenship then you have to decide which one you want - you cannot ever again be a dual national of China and any other place. You could apply to renaturalize as a Chinese citizen, but that would require, if your application is approved, that you renounce your US citizenship. If you do that then you would need a visa to return to the US as a visitor on your HKSAR passport. I don't think you would have any right to live or work in the US. However, you would be liable to US taxes on your worldwide income for the following 10 years!
So, in summary, you stuffed up by entering HK on your US passport. You may get away with it. The only way to test is to exit and try to re-enter on your HKID. And remember in future not to enter a country of which you are a citizen using a foreign passport - no country likes that.