I think what it is doing is that , in the first code
Initially x is 1
Then when it comes to second line for assigning to LHS it must first compute RHS soo here it sees there is an post increment in the statement soo it says "first use then increment" so it multiplies the value of 2 to 1 and then as x has been updated after this use it makes x to 2 soo now the concept is .
In the second code x in LHS is given value of 1 and not 2 since its post increment.
And hence 1 is printed .
The concept is about incrementation and usage , hope this helps.