$$\left|x\right|+\left|x-3\right|=3$$
Couple of ways to solve this. One way is to square both sides and then continue. Another way is to consider the function as a piece-wise function
$$2x-3=3 \text{ or x = 3,} \text{ when x > 3}$$ $$x-x+3=3 \text{ or 3 = 3,} \text{ when 0 < x < 3}$$ $$-x-x+3=3 \text{ or x = 0,} \text{ when x < 0}$$
So I got $2$ solutions like this, $x= 0$ and $3$ but $x=2$ is also a solution. So why is this method wrong
In the second interval, the LHS is always equal to RHS which means $f(x)=3$ for all values of $0<x<3$ which means all values in that interval is a solution of this.
I am making an answer cause I just found the reason♂️