How do we find the derivative of a multivariate expression wrt another multivariate expression? I have $f(\theta,b) = 1 - \theta x - b$.  I want to find $$\frac{df(\theta,b)}{d[\frac{1-b}{\theta}]}$$
i.e. the change in $f$ wrt $\frac{1-b}{\theta}$.  In the language of limits,
$$
\lim_{h \to 0, a \to 0} \frac{f(\theta + h, b + a) - f(\theta, b)}{\frac{1 - b - a}{\theta + h} - \frac{1 - b}{\theta}}
$$
I saw this How to find the derivative of one expression with respect to another expression
which made me think I could try
$$\frac{df(\theta,b)}{d[\frac{1-b}{\theta}]} = \frac{\frac{df(\theta,b)}{d\theta}}{\frac{d[\frac{1-b}{\theta}]}{d\theta}} = \frac{\theta^2 x}{1 - b}$$
But if I do the same strategy wrt the other variable, I get
$$\frac{df(\theta,b)}{d[\frac{1-b}{\theta}]} = \frac{\frac{df(\theta,b)}{db}}{\frac{d[\frac{1-b}{\theta}]}{db}} = \theta$$ which is a contradiction.
The thing about decomposing $\frac{df(\theta,b)}{dg(\theta,b)}$ into two separate expressions, and then calculate the product is a fundamentally flawed way to calculate multivariate derivatives. It does often work, but not all the time. This article goes into more detail about it.
To respond to your question, with
$$g(\theta,b)=\frac{1-b}{\theta}$$
we know that
$$\theta=\frac{1-b}{g(\theta,b)}$$
Therefore, we plug it into $f$ and get
$$f(\theta,b)=1-\frac{1-b}{g(\theta,b)} x-b$$
And so,
$$\frac{df(\theta,b)}{dg(\theta,b)} = \frac{(1-b)x}{g(\theta,b)^2}$$
which when plugging in for $g(\theta,b)$, gets us the answer you found first,
$$\frac{\theta^2 x}{1-b}$$
The thing about decomposing $\frac{df(\theta,b)}{dg(\theta,b)}$ into two separate expressions, and then calculate the product is a fundamentally flawed way to calculate multivariate derivatives. It does often work, but not all the time. This article goes into more detail about it.
To respond to your question, with
$$g(\theta,b)=\frac{1-b}{\theta}$$
we know that
$$\theta=\frac{1-b}{g(\theta,b)}$$
Therefore, we plug it into $f$ and get
$$f(\theta,b)=1-\frac{1-b}{g(\theta,b)} x-b$$
And so,
$$\frac{df(\theta,b)}{dg(\theta,b)} = \frac{(1-b)x}{g(\theta,b)^2}$$
which when plugging in for $g(\theta,b)$, gets us the answer you found first,
$$\frac{\theta^2 x}{1-b}$$