Answered by Borut | Jun. 20, 2023 11:20
Your first itinerary:
US - Shanghai - Hong Kong
Is definitely eligible for 144 hour visa free transit and there is no doubt about it.
Your second itinerary:
Hong Kong - Guangzhou - Macau
Is not eligible for 144, but for 24 hour visa free transit because you will stay in mainland China for less than 24 hours. This is not a problem, but you should just know this detail. Also, as far as I know, there are no currently ferries linking Guangzhou and Macau. In other words, you will have to travel to Shenzhen and take a ferry from Shekou port. This is all fine, but you should be aware that you will have to buy your ferry ticket in advance, print the ticket out and have it with you. Also, you will have to take exactly that ferry you have bought the ticket in advance.
One detail that could be inconvenient for your needs may be the fact that the last ferry from Shekou port to Macau departs at 18:30. Maybe it would be convenient to have an overnight in Guangzhou and to have a departure from Shekou after 08:55 (time when your flight will arrive in Guangzhou) because like this you would be traveling on 144 hour visa free transit.