It has to do with how rankings points are computed based on a rolling 12 months of results.
The short answer is - Nadal didn't play in the China Open last year - so he's "defending" zero points. It means he didn't win any rankings points from the event last year. So last week, zero points expired and fell from his points total.
Djokovic however, won the event last year, and got 500 rankings points because of that result. So, last week, those 500 points "expired" and fell off of his points total. So, even if Djokovic wins the event again, his points total will merely stay the same (or decrease if he doesn't win the title again) while Nadal can do nothing but increase his points total.
Here is how the math of it works out - Winning the title is worth 500 points, making the final (but losing) is worth 300 points.
Point totals Prior to China Open:
Djokovic 11120
Nadal 10860
Djokovic's 500 points from last year expire, Nadal was defending 0 points, so nothing expires for him:
Djokovic 10620
Nadal 10860
If Nadal reaches the final, he's earned (at least) +300 points. Let's assume Djokovic beats Nadal in the final - and reclaims the +500 points that expired:
Djokovic 11120
Nadal 11160
As you can see, it's a slim margin (40 points) - but Nadal would have a higher point total than Djokovic at the end of the tournament.