\documentclass[a4paper,11pt]{article}
\usepackage[polish]{babel}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{amsmath}



\begin{document}

\noindent
$A^{\underrightarrow{\qquad\tau\qquad}} B$\\[2mm]
$A^{\underrightarrow{f(x) + f'(x) + f''(x)}} B$

\end{document}