Question on solution of Casella and Berger Exercise 9.10: Showing that $Q(t,\theta)$ is a pivot My question concerns Exercise 9.10 of Statistical Inference by Casella and Berger: On page 428 the authors say

In general, suppose the pdf of a statistic $T$, $f(t|\theta)$, can be expressed in the form
$$ f(t|\theta) = g(Q(t,\theta)) \left| \frac{\partial}{\partial t} Q(t,\theta)\right| $$
for some function $g$ and some monotone function $Q$ (monotone in $t$ for each $\theta$). Then Theorem 2.1.5 can be used to show that $Q(T,\theta)$ is a pivot (see Exercise 9.10).

Exercise 9.10 just asks for a proof of this statement. 
For reference, here is Theorem 2.1.5 (slightly paraphrased):

Theorem 2.1.5 Let $X$ have pdf $f_X(x)$ and let $Y = g(X)$, where $g$ is a monotone function. Let $\mathcal{X}$ be the support of $f_X$ and let $\mathcal{Y} = g(\mathcal{X})$. Suppose that $f_X(x)$ is continuous on $\mathcal{X}$ and that $g^{-1}(y)$ has a continuous derivative on $\mathcal{Y}$. Then the pdf of $Y$ is given by
$$ f_Y(y) = f_X(g^{-1}(y)) \left| \frac{d}{dy}g^{-1}(y) \right|, \quad y \in \mathcal{Y}. $$

I got a bit stuck on this problem so I perused online and came across the following solution:

I'm a bit confused here. Specifically, how was the following line obtained?
$$ f_Y(y) = g(y) \left| \frac{d Q^{-1}(y;\theta)}{dt}\right|^{-1} \left| \frac{d Q^{-1}(y;\theta)}{dt}\right|  $$
obtained? 
Edit 5/7/22: Thanks to @whuber for the excellent proof. However, I'm still confused about why the following argument leads to a seeming contradiction. To hopefully make things clearer, I introduce the following notation:

*

*Let $\Theta$ be the parameter space.


*Let $\mathbb{S}^n (\subseteq \mathbb{R}^n)$ denote the sample space for a random sample of size $n$.


*Let $s: \mathbb{S}^n \rightarrow \mathcal{T}$ where $\mathcal{T} := s(\mathbb{S}^n) \subseteq \mathbb{R}^n$.


*Let $T = s(\mathbf{X})$ and let $f_T(t|\theta)$ be the pdf of $T$.


*Let $q: \mathcal{T} \times \Theta \rightarrow \mathbb{R}$ be a function which is monotone in $t$ for each $\theta \in \Theta$.


*For each $\theta \in \Theta$, let $q_{\theta}: \mathcal{T} \rightarrow \mathbb{R}$ be given by $q_{\theta}(t) := q(t,\theta)$ for all $t \in \mathcal{T}$.


*Let $g: q(\mathcal{T} \times \Theta) \to \mathbb{R}$ be a fixed function.


*For each $\theta \in \Theta$, let $Y_{\theta} = q_{\theta}(T)$ and let $f_{Y}(y|\theta)$ be the pdf of $Y_{\theta}$.
We are given that
$$  f_{T}(t|\theta) = g(q(t,\theta)) \left| \frac{\partial}{\partial t} q(t,\theta) \right| \qquad \forall (t,\theta) \in \mathcal{T} \times \Theta  \hspace{3cm}  $$
or equivalently,
$$ f_T(t|\theta) = g(q_{\theta}(t)) \left| \frac{d}{dt}q_{\theta}(t) \right| \qquad \forall (t,\theta) \in \mathcal{T} \times \Theta. \hspace{3cm} (1) $$
Now since $Y_{\theta} = q_{\theta}(T)$ where $q_{\theta}$ is monotone (by assumption), $q_{\theta}$ has a well-defined inverse $q_{\theta}^{-1}$. Then applying Theorem 2.1.5 and (1), we obtain
\begin{align*}
f_{Y}(y|\theta) &= f_T(q_{\theta}^{-1}(y)) \left| \frac{d}{dy} q_{\theta}^{-1}(y)\right| && (\text{Change of Vars Theorem}) \\[5pt]
&= \left(g(q_{\theta}(q_{\theta}^{-1}(y))) \left|\frac{d}{dy} q_{\theta}(q_{\theta}^{-1}(y)) \right| \right)  \left| \frac{d}{dy} q_{\theta}^{-1}(y)\right| && (\text{Applying (1)})     \\[5pt]
&= \left( g(y) \left|\frac{d}{dy}(y) \right| \right)  \left| \frac{d}{dy} q_{\theta}^{-1}(y)\right|  && (\text{Simplifying}) \\[5pt]
&= g(y) \left| \frac{d}{dy} q_{\theta}^{-1}(y)\right|. && (\text{Simplifying})
\end{align*}
But @whuber's answer shows that $f_Y \equiv g$, so we would need $\left|\frac{d}{dy} q_{\theta}^{-1}(y) \right| \equiv 1$. But this appears to be a contradiction because there was no such restriction on $q_{\theta}$ to begin with...where in the above argument did I go wrong?
Any insights, or alternative solutions, would be greatly appreciated.

In the first equation, the solution writer applied the change of variable formula to change from a density in $t$ to one in $Y = Q(t; \theta)$, as well as applying the given information about the format of $f_Y$. The complete statement of the change of variable formula can be found in Theorem 2.1.5 of Casella & Berger.
