\documentclass[border=1pt]{standalone}
\usepackage[polish]{babel}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}

\begin{document}

\begin{tikzpicture}
\node[draw,circle,minimum size=8mm] (A) at (0,0) {};
\node[draw,circle,minimum size=8mm] (B) at (4,0) {};
\node[draw,circle,minimum size=8mm] (C) at (8,0) {};

\draw[-LaTeX] (A.north east) to[out=30,in=150] 
  node [very near start, above] {$x$} 
  node [very near end, above=2pt] {$f(x)$} (B.north west);
\draw[-LaTeX] (B.north east) to[out=30,in=150] 
  node [very near start, above=2pt] {$f(x)$} 
  node [very near end, above=4pt] {$g(f(x))$} (C.north west);
\draw[-LaTeX] (A.south east) to[out=330,in=210] 
  node [very near start, below] {$x$} 
  node [very near end, below=3pt] {$f\circ g(x)$} (C.south west);
\end{tikzpicture}

\end{document}