That is right, and rigorous, although there are clearer ways of writing it - and you don't actually need to use lagrange.
I'm presuming by maximal subgroup you mean a proper subgroup (i.e. not $G$) that is not contained in any other proper subgroup? (and also assuming that you only mean the result to hold for proper subgroups - else you need have $G$ as the only maximal subgroup, and clearly all subgroups are contained in $G$).
Clearer phrasing could be:
Suppose the statement is false. Then have some subgroups of $G$ that are not contained in any maximal subgroup. Note that the order of subgroups of $G$ is bounded by $n$. Then there must be some subgroup $H < G$ of largest order s.t. it is not contained in any maximal subgroup.
Then $H$ is not maximal, so $\exists H_1 \not = H$ a proper subgroup of $G$ with $H < H_1$. Since $\lvert H_1 \rvert > \lvert H \rvert$, $H_1$ is contained in some maximal subgroup $M$. But then $H < M$ - contradiction.
Alternatively:
Let $H$ be a proper subgroup of $G$. Either $H$ is maximal, or $H < H_1$ with $H_1$ a proper subgroup of $G$ that has strictly larger order. Continuing in this way, we construct a chain of proper subgroups of $G$; $H < H_1 < H_2 < ...$. This gives a strictly increasing chain of integers $\lvert H \rvert < \lvert H_1 \rvert < \lvert H_2 \rvert < ...$ which is bounded above by $n$, hence must terminate - giving a maximal subgroup containing $H$.
Suppose $N$ is a proper closed subgroup of the profinite group $G$. Then $G/N$ is non-trivial and profinite (as I pointed out here), so it has a maximal subgroup $M$ of finite index (as Eric explained here). Letting $\pi\colon G\to G/N$ be the quotient map, $\pi^{-1}(M)$ is a proper subgroup of $G$ of finite index containing $N$. Let $M'$ be a subgroup of $G$ of minimal finite index among those proper subgroups containing $N$. Then $M'$ is a maximal subgroup of $G$.
Best Answer
No. For instance, let $G$ be a vector space over $\mathbb{F}_p$ for some prime $p$. Then every proper subgroup (i.e., subspace) is contained in a maximal subgroup (i.e., codimension 1 subspace) but $G$ is not finitely generated unless it is finite dimensional.