Consider a basic 1D heat equation
$$\frac{\partial^{2} T(x, t)}{\partial x^{2}}=\kappa \frac{\partial T(x, t)}{\partial t} $$
for two isolated 1D rods with different thermal diffusivities $\kappa$ and lengths ($AB$ and $CD$), one at 0°C and the other at 100°C.
Then connecting them at points $B$ and $C$. We don't have fixed boundary conditions, as the temperature changes by time in both $B$ and $C$.
Initial Conditions: $$\begin{array}{ll} \mathrm{IC\ (rod\ 1)}: & T(x, t=0)=0\\ \mathrm{IC\ (rod\ 2)}: & T(x, t=0)=100 \end{array}$$
How can we set the boundary conditions? We have to define boundaries conditions based on solving the other equation:
$$\begin{array}{ll} \mathrm{BC\ (rod\ 1)}: & T(x=B)=f(\tau) \\ \mathrm{BC\ (rod\ 2)}: & T(x=C)=g(\tau) \\ \end{array}$$
How can we solve the heat equations for these boundary conditions, as $f(\tau)$ is given by solving the heat equation for rod 2, and $g(\tau)$ is given by solving the heat equation for rod 1.
The focus is not the difference between $f$ and $g$. How can we solve the heat equation if assuming $f$=$g$?