
\documentclass{article}
\usepackage[body={8cm,8cm}]{geometry}
%\usepackage{mathtools}
\usepackage{lmodern}
\pagestyle{empty}
\begin{document}
\[
f_d = f_{\widehat{ef}}
\mathrm{\ devient\ }
f_{\vphantom{\widehat{ef}} d}
    = f_{\widehat{ef}}. 
\]
\end{document}
