The temperature gradient, $\frac{\mathrm{d} \theta}{\mathrm{d} x}$, of a slab of thickness $t$ and with thermal conductivity $k$ is given by
$$
\frac{\mathrm{d} \theta}{\mathrm{d} x}=C
$$
where $C$ is a constant and $\theta$ is a function of $x$.
By using the conditions $\theta(0)=\theta_{1}, \theta(t)=\theta_{2}$ and Fourier's law
$$
Q=-k A \frac{\mathrm{d} \theta}{\mathrm{d} x}
$$