Is $ord(xy)$ independent of $ord(x)$ and $ord(y)$ in a finite group? Let $r,s,t>1$ be positive integers. Must there exist a finite group $G$ with elements $x$ and $y$ such that $ord(x)=r$, $ord(y)=s$, and $ord(xy)=t$?
The answer is probably "yes." Is there a nice description of such a $G$?
 A: Let $a$ and $b$ be elements of a group $G$. If $a$ has order $m$ and $b$ has
order $n$, what can we say about the order of $ab$? The next theorem shows
that we can say nothing at all.
THEOREM: For any integers $m,n,r>1$, there exists a finite group $G$ with
elements $a$ and $b$ such that $a$ has order $m$, $b$ has order $n$, and $ab$
has order $r$.
PROOF: We shall show that, for a suitable prime power $q$, there exist elements $a$
and $b$ of $SL_{2}(F_{q})$ such that $a$, $b$, and $ab$ have
orders $2m$, $2n$, and $2r$ respectively. As $-I$ is the unique element of
order $2$ in $SL_{2}(F_{q})$, the images of $a$, $b$, $ab$ in
$SL_{2}(F_{q})/\{\pm I\}$ will then have orders $m$, $n$, and $r$
as required.
Let $p$ be a prime number not dividing $2mnr$. Then $p$ is a unit in the
finite ring $\mathbb{Z}/2mnr\mathbb{Z}$, and so some power of it, $q$ say,
is $1$ in the ring. This means that $2mnr$ divides $q-1$. As the group
$F_{q}^{\times}$ has order $q-1$ and is cyclic,
there exist elements $u$, $v$, and $w$ of $F_{q}^{\times}$ having
orders $2m$, $2n$, and $2r$ respectively.
Let
$$
a=\left(
\begin{array}{cc}
u & 1\\
0 & u^{-1}
\end{array}
\right)$$

and $$b=\left(
\begin{array}{cc}%
v & 0\\
t & v^{-1}%
\end{array}
\right)$$
(elements of $SL_{2}(F_{q})$), where $t$ has been chosen so that
$$
uv+t+u^{-1}v^{-1}=w+w^{-1}.
$$


The characteristic polynomial of $a$ is $(X-u)(X-u^{-1})$, and so $a$ is
similar to $diag(u,u^{-1})$. Therefore $a$ has order $2m$. Similarly $b$ has
order $2n$. The matrix
$$
ab=\left(
\begin{array}{cc}
uv+t & v^{-1}\\
u^{-1}t & u^{-1}v^{-1}%
\end{array}
\right)  ,
$$
has characteristic polynomial
$$
X^{2}-(uv+t+u^{-1}v^{-1})X+1=(X-w)(X-w^{-1})\text{,}
$$
and so $ab$ is similar to $diag(w,w^{-1})$. Therefore $ab$ has order
$2r$.

I don't know who found this beautiful proof. Apparently the
original proof of G.A. Miller is very complicated; see MO24940.
A: Here's my comment as an answer:
Take the $r,s,t$--(ordinary) triangle group $T(r,s,t)=\langle x,y \ | \ x^r=y^s=(xy)^t = 1 \rangle$, in which $x$, $y$, and $xy$ have the correct orders. See the section on ``von Dyck" groups here.
As Anton mentions in his comment, $T(r,s,t)$ is infinite when $\frac{1}{r} + \frac{1}{s} + \frac{1}{t} \leq 1$. However, $T(r,s,t)$ is residually finite.  The easiest way to see this is to use the facts that finitely generated linear groups are residually finite (due to Malcev, as Steve D mentions), and the fact that $T(r,s,t)$ is linear.
To see that $T(r,s,t)$ is linear, note that when $\frac{1}{r} + \frac{1}{s} + \frac{1}{t} = 1$, it is a discrete subgroup of the affine group $\mathbb{R}^2 \rtimes \mathrm{SL}_2(\mathbb{R})$, and when $\frac{1}{r} + \frac{1}{s} + \frac{1}{t} < 1$, it is a discrete subgroup of $\mathrm{Isom}^+(\mathbb{H}^2) \cong \mathrm{PSL}_2(\mathbb{R}) \cong \mathrm{SO}_0(2,1)$, where $\mathrm{SO}_0(2,1)$ is the identity component of $\mathrm{SO}(2,1)$.  See this again.
Now, since $T(r,s,t)$ is residually finite, there is a quotient $G$ in which $$x, x^2, \ldots, x^{r-1}, y, y^2, \ldots, y^{s-1}, (xy), (xy)^2, \ldots, (xy)^{t-1}$$ are all nontrivial. This is the $G$ you seek.
Also see Steve D's answer here.
