<s>[INST] How do you solve an equation like this? We have an equation:
$ \dfrac{p-1}{q} = \dfrac{q-1}{2p+1} = \dfrac {3}{5}$
How do you solve these types of equations? For example, if we have:
$\dfrac{1}{x} = \dfrac{3}{2} $, we use:
$1\times 2 = 3\times x$
$x = 1.5$
What is a similair approach to my equation?
 [/INST] $$ \frac{p-1}{q} = \frac{q-1}{2p+1} = \frac {3}{5}$$ so 
$$\frac{p-1}{q}=\frac {3}{5}$$ and $$\frac {3}{5}=\frac{q-1}{2p+1}.$$
\begin{eqnarray}
5p-5&=3q&\\
6p+3&=&5q-5
\end{eqnarray}
$$5p-3q=5$$
$$6p-5q=-8$$
$$30p-18q=30$$
$$30p-25q=-40$$
$$-7q=-70$$
$$q=10$$
$$p=7.$$
</s>