Problem:
A rod of length $2$ units moves so that its ends are on the positive $x$-axis and on the line $x+y=0$ which lies in the second quadrant. Find the locus of the midpoint of the rod.
My approach:
Let the midpoint be $P(h,k).$ Let the end on the $x$-axis have coordinates $(x_2,0$). The end on $x+y=0$ has coordinates $(x_1,y_1)$. $$\Rightarrow 2h=x_1+x_2$$ $$\Rightarrow 2k=y_1$$ $$\Longrightarrow 2h+2k=x_2$$
I cannot eliminate $x_2$ from the equation.
You have not used the information of the length of the rod yet. That gives you $$(x_2-x_1)^2+(0-y_1)^2=4$$
If you plug $x_2=2h+2k, x_1=-2k , y_1=2k$ into this, you will find an equation about $h,k$.