Here's how you can work out the answer from scratch, without needing any clever leaps of insight of the form "let's try a solution like this!".
It does require a few "tricks of the trade", which I will point out as they come up. But those are general-purpose tricks rather than specific insights into this problem. Aside from that, we'll just do the easiest thing available at each step :-).
When I first answered this, I misinterpreted the question as requiring our numbers to be integers. It seems like an interesting question either way, so here first of all is my original answer, followed by a version that (as the OP intended) doesn't make that assumption.
When our numbers are required to be integers
So, suppose our two numbers are $a,b$. Their geometric mean is $\sqrt{ab}$; that's an integer, so $ab$ is a square. So [TRICK 1] we must have $a=pq^2$ and $b=pr^2$ for some integers $p,q,r$.
That takes care of the geometric mean. The arithmetic mean just needs $a,b$ to have the same parity, which is going to be easy. So what about the harmonic mean? That's $\frac{2ab}{a+b}$. It has to be an integer, so let's give it a name, $h$ say. So $2ab=h(a+b)$ or, in terms of the new variables we introduced above, $2p^2q^2r^2=ph(q^2+r^2)$. Let's lose a factor of $p$: $2pq^2r^2=h(q^2+r^2)$. And, remember, this equation is the only thing we need other than making sure $a,b$ are both odd or both even.
The next thing to notice is that the LHS is a multiple of both $q^2$ and $r^2$. Wouldn't it be nice if that factor of $q^2+r^2$ on the right weren't getting in the way? Aha! [TRICK 2] We can get rid of it, because we can assume that $q$ and $r$ are coprime. Why? Because all we need is $a=pq^2$ and $b=pr^2$, and if $q,r$ have a common factor we can move its square into $p$.
So, we have $q,r$ coprime. Now $q^2\mathrel|2pq^2r^2=h(q^2+r^2)$. Since clearly $q^2\mathrel|hq^2$ this yields $q^2\mathrel|hr^2$ and now since $q,r$ have no common factor we must have $q^2\mathrel|h$. Similarly $r^2\mathrel|h$. Even better, since $q,r$ have no common factor these two give us $q^2r^2\mathrel|h$.
Just as with the original HM, we have one thing dividing another so let's name the quotient. Say $h=tq^2r^2$. What happens to the equation we were looking at? It becomes $2pq^2r^2=tq^2r^2(q^2+r^2)$ or, dividing out the junk, $2p=t(q^2+r^2)$.
But now we're done, because we can just (again, aside from a little bit of caution about parity) take $q,r,t$ to be anything we like and define $p$ by this equation! We will then get $p=t(q^2+r^2)/2$ and then $a=pq^2$ and $b=pr^2$.
Let's figure out those parity constraints. If $q,r$ have the same parity (i.e., are both odd or both even) then $q^2+r^2$ is even, so $p$ is automatically an integer, and $a,b$ automatically have the same parity, so everything is good. If $q,r$ have opposite parity then we will need $p$ to be not only an integer but an even integer, and since $q^2+r^2$ will be odd this requires $t$ to be a multiple of 4.
Putting the bits together, the following procedure (1) always yields $a,b$ with AM,GM,HM all integers and (2) produces every possible such $a,b$:
Choose positive integers $q,r,t$. If $q,r$ are of opposite parity, $t$ must be a multiple of 4; otherwise $t$ is unrestricted. Now write $p=t(q^2+r^2)/2$ and then $a=pq^2$ and $b=pr^2$. (This gives $a\neq b$ provided $q\neq r$.)
Let's look at a couple of simple examples, trying to make our numbers small. First, with $q,r$ of the same parity. Let's try $q=1,r=3$. Then $t$ can be anything; let's set it to 1. We get $p=5$ and then $a,b=5,45$. The AM is 25, the GM is 15, and the HM is 9.
Next, with $p,q$ of opposite parity. Let's try $q=1,r=2$. Then $t$ has to be a multiple of 4; let's make it 4. We get $p=10$ and then $a,b=10,40$. The AM is 25, the GM is 20, and the HM is 16.
When our numbers are not required to be integers
As I confessed above, all of that assumes that you specifically want your numbers $a,b$ to be integers. What if you are happy for them to be any real numbers at all? How much extra freedom does that give you? Perhaps less than you might think; let's see. Once again, so far as possible I'm just going to do easy things and see where they lead.
First of all, their AM is an integer. Call it $n$; so our numbers are $a=n+d$ and $b=n-d$ for some (not necessarily integral) $d$. Now the GM $\sqrt{ab}$ is an integer too, so its square $ab$ certainly is, so $(n+d)(n-d)=n^2-d^2$ is an integer. So $d$ is the square root of an integer; let's say it's $\sqrt{m}$. Finally, the HM is $\frac{2ab}{a+b}=\frac{ab}n=\frac{n^2-m}n$, so $m$ is an integer multiple of $n$, say $kn$.
So far, we have figured out that we have $a,b=n\pm\sqrt{kn}$ for some integers $n,k$. The only thing we haven't used yet is the fact that the GM itself (and not only its square) is an integer; that is, that $n^2-kn=n(n-k)$ is a square; the conditions we've established above are enough to make the AM and HM squares, and the GM the square root of an integer. So, the only further condition is that $n(n-k)$ be a square. Well, by TRICK 1 above this is the same as having $n=pq^2$ and $n-k=pr^2$ for integers $p,q,r$.
So here's the general solution when $a,b$ don't have to be integers:
Choose positive integers $p,q,r$ with $r<q$. Write $n=pq^2$ and $k=p(q^2-r^2)$. Set $a,b=n\pm\sqrt{kn}$.
Let's once again look at a simple example where the integers involved are small and $a,b$ aren't themselves integers. First, take $p=1,q=2,r=1$. Then $n=4$ and $k=3$ so our numbers are $4\pm\sqrt{12}$. The AM is 4; the GM is 2; the HM is 1.