We are given that $m$ and $n$ are positive integers such that $\operatorname{lcm}(m,n) + \operatorname{gcd}(m,n) = m + n$.
We are looking to prove that one of numbers (either $m$ or $n$) must be divisible by the other.
We are given that $m$ and $n$ are positive integers such that $\operatorname{lcm}(m,n) + \operatorname{gcd}(m,n) = m + n$.
We are looking to prove that one of numbers (either $m$ or $n$) must be divisible by the other.
Hint $ $ For $\,x = \gcd(m,n),\ {\rm lcm}(m,n) = mn/x,\,$ thus your equation is $\,(x-m)(x-n) = 0.$ Thus either $\,x = \gcd(m,n) = m,\,$ so $\,m\mid n,\ $ or $\,x = \gcd(m,n) = n,\,$ so $\,n\mid m.$
More generally if integers $\,g,\ell\,$ and $\,m,n\,$ have equal sums & equal products then $\{g,\ell\} = \{m,n\},$ so in OP: $\,\gcd(m,n) = g = m\,$ or $\,n\,$ (which yields the above proof).
We may suppose without loss of generality that $m \le n$. If $\text{lcm}(m,n) > n$, then $\text{lcm}(m,n) \ge 2n$, since $\text{lcm}(m,n)$ is a multiple of $n$. But then we have
$\text{lcm}(m,n) < \text{lcm}(m,n)+\gcd(m,n) = m + n \le 2n \le \text{lcm}(m,n)$,
a contradiction. So $\text{lcm}(m,n) = n$.
Let $a$ be the gcd, and $b$ the lcm. We are told that $$a+b=m+n.$$ It is a result I hope known to you that the gcd of two positive integers, times their lcm, is equal to the product of the two integers. Thus $$ab=mn.$$ So $a$ and $b$ are the roots of the same quadratic equation as $m$ and $n$, namely the equation $x^2-(m+n)x+mn=0$.
Without loss of generality we may assume that $m\le n$. Thus $a=m$ and $b=n$. sinnce $\gcd(m,n)=m$, we conclude that $m$ divides $n$.
$\newcommand{\l}{\operatorname{lcm}}$
There are already good answer to this question, but I like to demonstrate an important technique. First note that the equation is homogeneous since $$\gcd(k m, k n) +\l(k m, k n) = k(\gcd(m,n)+\l(m,n))$$ and $$km+kn=k(m+n)$$ for $k>0$. Also the conclusion is homogeneous since $$k m \mid k n \quad \text{ if and only if }\quad m \mid n$$
Then it's enough to deal with the case where $\gcd(m,n)=1$. The equation becomes $mn + 1 = m + n$ which factors as $(m-1)(n-1)=0$, so $m=1$ or $n=1$.
If $m=n$ then the equation is true and the statement to be proved is true.
If $m\ne n$, label the numbers so that $m>n$. Then, modulo $m$, $\gcd(m, n)=\textrm{LHS}=\textrm{RHS}=n$. But $0<\gcd(m, n)\leqslant n$, so $\gcd(m, n)=n$, so $n\mid m$, QED.
Let $g=gcd(m,n)$, then converting lcm to gcd:
$g+\frac{mn}{g}=m+n \iff g^2+mn=g(m+n) \iff g^2-g(m-n)+mn=0 \iff g^2-gm-gn+mn=0 \iff (g-m)(g-n)=0$
This gives that either $g=m$ or $g=n$. WLOG $g=m \implies gcd(m,n)=m \implies m\mid n$