Growth kinetics of intermediate compounds at a planar solid-solid or solid-liquid interface by diffusion mechanisms