**Original Post:**

Suppose we have two random variables $X$ and $Y$ with cumulative distribution functions $F(x)$ and $G(y)$. We know that $Y = aX + b$.

I want to compute $Z(x) = F(x) - G(y)$.

What I have so far is the following:
$$F(x) = \int_{-\infty}^{x}f(x)dx
$$

$$G(y) = \int_{-\infty}^{y}g(y)dy = \int_{-\infty}^{y}\frac{1}{|a|}f\left(\frac{y-b}{a}\right)dy
$$

$$Z(x) = \int_{-\infty}^{x}f(x)dx - \int_{-\infty}^{y}\frac{1}{|a|}f(x)dy
$$

How should I go on doing the subtraction of the integrals? Is this even possible as the integrales belong to different variables (dx and dy)?

**Solution thanks to jbowman:**

Suppose $a>0$ and $y=ax+b$

$$G(y) = P(aX+b <= y)$$
$$G(y) = P(aX+b<=ax+b) = P(X<=x) = F(x)$$
And thus:
$$Z(x,y) = F(x) - G(y) = 0$$

**Corrected Post**

Suppose we have two random variables $X$ and $Y$ with cumulative distribution functions $F(k)$ and $G(k)$. We know that $Y = aX + b$.

I want to compute $Z(k) = F(k) - G(k)$.

**Proposed solution:**

$$F(k) = \int_{-\infty}^{k}f(x)dx
$$

$$G(k) = \int_{-\infty}^{k}g(y)dy = \int_{-\infty}^{\frac{k-b}{a}}f(x)dx
$$

$$Z(k) = \int_{-\infty}^{k}f(x)dx - \int_{-\infty}^{\frac{k-b}{a}}f(x)dx
$$

And thus

$$Z(k) = \int_{\frac{k-b}{a}}^{k}f(x)dx
$$