Let θ be the temperature of the common face of the two slabs. In the steady state no heat collects at this face, so the same rate of heat flow H passes through both slabs:
H=d1K1A(θ1−θ)=d2K2A(θ−θ2)
Rearranging each part gives the temperature drop across each slab:
θ1−θ=K1AHd1,θ−θ2=K2AHd2
Adding these eliminates θ:
θ1−θ2=AH(K1d1+K2d2)
so
H=K1d1+K2d2A(θ1−θ2)
The temperature of the common face follows from equating the two expressions for H:
θ=d1K1+d2K2d1K1θ1+d2K2θ2
For any number of layers in series, H=∑(d/K)A(θ1−θ2): each layer adds its own KAd (its thermal resistance), just as resistors in series add.