Let $X$ be a geometric random variable parameterized by $p$. Furthermore, let $Y$ be a random variable such that $Y=1$ iff a success is obtained on the first trial and $Y=0$ otherwise.
To find $ \text{Var}[X] = \text{E}[X^2] - \text{E}[X]^2 $ using the law of total expectation... recognize that whenever $Y=1$ we have $X=1$, and whenever $Y=0$, the random experiment is still associated with a geometric random variable parameterized by $p$ but with $1$ extra trial. In other words, whenever $Y=0$ we have $X = Z+1$ where $Z$ is a geometric random variable parameterized by $p$.
First, find $\text{E}[X]$ as follows
$ \text{E}[X] = \text{E}[\text{E}[X|Y]] = \sum_{i=0}^1 \text{E}[X|Y=i]P(Y=i) $
$ = \text{E}[X|Y=0]P(Y=0) + \text{E}[X|Y=1]P(Y=1) $
$ = \text{E}[Z+1|Y=0]P(Y=0) + \text{E}[1|Y=1]P(Y=1) $
$ = (\text{E}[Z]+\text{E}[1])(1-p) + 1p = (\text{E}[Z]+1)(1-p) + p$
$ = (\frac{1}{p}+1)(1-p) + p = \frac{1}{p}$
Then find $\text{E}[X^2]$ as follows
$\text{E}[X^2] = \text{E}[\text{E}[X^2|Y]] = \sum_{i=0}^1 \text{E}[X^2|Y=i]P(Y=i)$
$= \text{E}[X^2|Y=0]P(Y=0) + \text{E}[X^2|Y=1]P(Y=1)$
$= \text{E}[(Z+1)^2|Y=0]P(Y=0) + \text{E}[1^2|Y=1]P(Y=1)$
$= \text{E}[Z^2 + 2Z + 1|Y=0](1-p) + 1^2p$
$= (\text{E}[Z^2] + \text{E}[2Z] + \text{E}[1])(1-p) + p$
$= (\text{E}[Z^2] + 2\text{E}[Z] + 1)(1-p) + p$
Now, consider that $X=Z$. Thus,
$\text{E}[X^2] = (\text{E}[X^2] + 2\text{E}[X] + 1)(1-p) + p = (\text{E}[X^2] + 2\frac{1}{p} + 1)(1-p) + p$
Implement basic algebra to isolate $\text{E}[X^2]$ on one side of the equation and obtain
$\text{E}[X^2] = \frac{2-p}{p^2}$
You can also find $\text{E}[Z^2]=\frac{2-p}{p^2}$ by the moment generating function $\text{E}[Z^n]=\frac{d^n}{dt^n} \text{E}[e^{tZ}] |_{t=0}$ where $n=2$. Hence, $\text{E}[Z^2]=\frac{d^2}{dt^2} \text{E}[e^{tZ}] |_{t=0} = \frac{d^2}{dt^2} \frac{pe^t}{1-(1-p)e^t} |_{t=0} = \frac{2-p}{p^2}$.
If you really want to nerd out, then use the definition of expectation
$\text{E}[Z^2] = \sum_{i=1}^\infty i^2 P(Z=i) = \sum_{i=1}^\infty i^2 (1-p)^{i-1}p^i$
$= \frac{1}{1-p} \sum_{i=1}^\infty i^2 (1-p)^ip^i = \frac{1}{1-p} \sum_{i=1}^\infty i^2 [(1-p)p]^i$
This can be solved analytically (but with a lot more work) by letting $a=(1-p)p$ and observing $|a|=|(1-p)p|<1$. Then, by substitution we can find $\sum_{i=1}^\infty i^2 a^i$ as follows: $(1)$ Take the derivative of the $n$th partial sum of the geometric series $\sum_{i=1}^n a^i= \frac{1-a^{n+1}}{1-a} -1$ and multiply it by a factor of $a$, $(2)$ take the derivative once again and multiply it by a factor of $a$, $(3)$ find the limit of this result as $n \to \infty$ (you may have to use L'Hopital's Rule).