Let $(h, k)$ be the coordinates of the mid-point of the line $AB$ then it will intersect the coordinate axes at the points $A(2h, 0)$ & $B(0, 2k)$ respectively hence line $AB$ has x-intercept $2h$ & y-intercept $2k$,
Now, the equation of the line $AB$ is given by intercept form as $$\frac{x}{2h}+\frac{y}{2k}=1\tag 1$$
Now, since the above line $AB$ passes through the intersection point of the lines: $\frac{x}{a}+\frac{y}{b}=1$ & $\frac{x}{b}+\frac{y}{a}=1$ hence setting the coordinates of the intersection point $\left(\frac{ab}{a+b}, \frac{ab}{a+b}\right)$ in (1),
$$\frac{\frac{ab}{a+b}}{2h}+\frac{\frac{ab}{a+b}}{2k}=1$$
$$\frac{1}{h}+\frac{1}{k}=\frac{2(a+b)}{ab}$$
or $$\frac{h+k}{hk}=\frac{2(a+b)}{ab}$$
or $$2hk(a+b)=ab(h+k)$$ Now, setting $h=x$ & $k=y$ in the above equation, the locus of the mid-point of line $AB$
is given as follows $$\color{red}{2xy(a+b)=ab(x+y)}$$