The demand of a good or demand is the amount of people who are willing and able to buy it.
In this case, the average housing price in Beijing increased, however, the average income of citizens, or in another word consumers of housing companies didn’t increase. This result in some people were not able to buy house anymore, and some might didn’t feel worth of buying a house at that price, therefore, the quantity demanded of houses decreased.
However, because in the case the price of the house is the only factor that changes the quantity demanded for houses, it Is an change along the demand curve rather a shift to left or right.
When the demand of a good or service falls, the quantity demanded for their substitute goods increases.
In this case, the substitute goods were second-hand houses. Therefore, even though the price of houses increased caused the quantity demanded of houses decreased, but people were still able to buy second-hand houses since they were cheaper. Thus the quantity demanded of second-hand house increased.