Ok, I had another thought about this. Given any integer, we can write it as \(\displaystyle x = p^a k\) for some nonnegative integer \(\displaystyle a\) and an integer \(\displaystyle k\) not divisible by \(\displaystyle p\). Then, the map \(\displaystyle x \mapsto (k\pmod{q^n}, p^a)\) along with the maps \(\displaystyle (k\pmod{q^n}, p^a) \mapsto (k\pmod{q^m}, p^a)\) allows us to take the inverse limit, which yields \(\displaystyle \Bbb{Z}_q \times \{p^n \mid n \in \Bbb{N}^*\}\). There is a natural injection \(\displaystyle \Bbb{Z} \hookrightarrow \Bbb{Z}_q \times \{p^n \mid n \in \Bbb{N}^*\}\).

Next, define \(\displaystyle d: \Bbb{Q}\times \Bbb{Q} \to [0,\infty]\) by

\(\displaystyle d(x,y) = \begin{cases}|x-y|_q & \text{if }|x|_p = |y|_p \\ \infty & \text{otherwise}\end{cases}\)

It is easy to see that this is a metric. Since \(\displaystyle \{x \in \Bbb{Q} \mid |x|_p = 1\}\) is dense in \(\displaystyle \Bbb{Q}\), it seems like this completion gives a copy of \(\displaystyle \Bbb{Q}_q\) for each nonzero power of \(\displaystyle p\) (or am I mistaken?) and again, there seems to be a natural injection \(\displaystyle \Bbb{Q} \hookrightarrow \Bbb{Q}_q \times \left\{p^n \mid n\in \Bbb{Z}\right\}\) (again, unless I am mistaken, and the completion of the rationals with respect to that metric produces something different).

So, this seems like the analytic completion of the rationals and the algebraic completion of the integers with respect to two primes simultaneously that I was hoping for (at least, in some form). Am I correct? It is entirely possible that this does not work as I hope.