Let $a_p$ denote the matrix $[[1,0],[0,p]]$, where $p$ is prime.
Then $SL_2(\mathbb{Z}[1/p])$ can be presented as the amalgamated product
$$SL_2(\mathbb{Z})*_{\Gamma_0(p)} a_pSL_2(\mathbb{Z})a_p^{-1}$$ where $\Gamma_0(p)$ are the matrices which are upper-triangular mod $p$, and the inclusions into the two factors are the natural ones.
I'd like to construct the group $GL_2(\mathbb{Z}[1/p])$ (in the software package GAP) as a semidirect product of $SL_2(\mathbb{Z}[1/p])$ and $p^\mathbb{Z}$.
For this, I need to tell GAP the action of conjugation of $a_p$ on $SL_2(\mathbb{Z}[1/p])$ in terms of the generators of the amalgamated product.
I'm sure this must have been done somewhere. Does anyone have a reference? (Or perhaps can someone give an explicit presentation of this conjugation action?)
Well, this is an exercise, what had you tried?
Let $u=e_{12}(1)$, $v=e_{21}(1)$, $w=e_{12}(p^{-1})$, $x=e_{21}(p)$ be the given generators (actually $u=w^p$ and $x=v^p$ are redundant).
Then for $a=a_p$, we have $aua^{-1}=w$, $ava^{-1}=x$, $axa^{-1}=x^p$. It remains to express $awa^{-1}=e_{12}(p^{-2})$ in terms of the generators.
We have $e_{12}(t^{-1})e_{21}(-t)e_{12}(t^{-1})=s(t):=\begin{pmatrix}0 &t^{-1}\\ -t & 0\end{pmatrix}$, and $s(t)s(-1)=d(t):=\begin{pmatrix}t^{-1} & 0\\ 0 & t\end{pmatrix}$. We have $d(t)e_{12}(1)d(t)^{-1}=e_{12}(t^{-2})$.
So, we have $$awa^{-1}=d(p)ud(p)^{-1}=s(p)s(-1)us(-1)^{-1}s(p)^{-1}=wx^{-1}wu^{-1}vuv^{-1}uw^{-1}xw^{-1}.$$
(If no stupid mistake in the computation.)