Although to do it properly is difficult, using some tricks make it easy. These tricks shouldn't really be used for normal questions. This is really a more educated trial and error keeping in mind the design of the question.
The idea is to note that since we are adding 2 real numbers on left hand side, the easiest way to get
as a total is to assume it appears on both terms. In other words |z| should be
for some real positive a.
We note since 2+i part of the denominator has a modulus of
, we see that it is ideal if z is a multiple of 2+i as then we will get the
term we need.
So let z=a(2+i) for some real number a. Then we can sub it in to get:
As for the rest, you can either solve it properly or note that again we dont want another irrational term in
so we choose a=1 to guarantee that the real parts disappear. Either way you get the answer is z=2+i. But this method is pretty bs to be honest and you don't learn much from doing this question.