MWG Proposition 2.F.1
In between eq. $(2.F.2)$ and $(2.F.3)$ we read


  ...Walras's law tells us that $w' = p'\cdot x(p',w')$


Assume now that homogeneity of degree zero does not hold. Then we have, $a&gt;0$

$$x(ap,aw) \neq x(p,w)$$

see definition $2.E.1$

Then we can set $p'=ap,w'=aw$ to examine the case $x(p',w') \neq x(p,w)$.

But then Walras' law would imply

$$w' = p'\cdot x(p',w') \implies aw = ap\cdot x(ap,aw) \implies w = p\cdot x(ap,aw)$$

while also, again by Walras' law we have

$$w = p\cdot x(p,w)$$

So under the assumption that Walras' law holds but that we do not have homogeneity of degree zero we end up saying

$$p\cdot x(ap,aw) = p\cdot x(p,w), \,\,\, x(ap,aw) \neq x(p,w)$$

I believe you can contemplate the situation further from here.