An operator-theoretic approach to theorems of the Pick-Nevanlinna and Carathéodory types