For x>0 the power rule applies directly, so both sides exist and are equal.
For x<0 the left side is defined, since x2>0, but the right side contains logbx with a negative argument, which does not exist. At x=0 neither side exists.
At x=−4:logb((−4)2)=logb16,while 2logb(−4) is undefined.
So the statement holds exactly on x>0. The version that survives for every x=0 is logb(x2)=2logb∣x∣.