Abstract Algebra: subgroups and order proof

Hi sorry I did not know what to title this question!

Here is the problem:

Suppose that G has exactly three subgroups. Prove that G is finite and the order of G is a prime squared.

ATTEMPT:

G is either finite or infinite. Assume it is infinite. For g in G consider <g> ={g^n | n an integer} and <g^2> = {g^2n | n an integer} these both are subgroups but <g> =/= <g^2> so G has more than 3 subgroups so G cannot be infinite.

Now we must show that its order is a prime squared but i dont know what to do?

Any hints?