Answered by ZUPAN
                                    |
                                    Oct. 07, 2019 12:56
                                
                                
                                No, unfortunately not. You are not allowed to travel to two Chinese transit areas (in your case Shanghai and Beijing) in a row and to be eligible for 144 hour visa free transit. 
In reality, you cannot be eligible even for the fact that you plan to fly:
Australia - China - Australia
As you can see, this is not a transit, but a visit to China. There has to be a third country or eligible territory that will make your itinerary an eligible one. 
For example, an eligible itinerary would be:
Australia - Shanghai - Hong Kong - Australia
Or if you want both Shanghai and Beijing:
Australia - Shanghai - South Korea (or Taiwan or Japan) - Beijing - Australia
Of course, you have to calculate the prices and see whether a visa expenses would be maybe more feasible than the above mentioned flight combinations.