First Version
This is just quick and dirty, sorry, I am too busy today. I hope a real pro can take it from here. View in Adobe Reader!
\documentclass{article}
\usepackage{animate}
\begin{document}
\begin{animateinline}[controls]{2} % The "2" controls the speed. Othe options are "autoplay" or "loop".
% First frame
\makebox[20mm][l]{kg x N/kg} % makebox to reserve space
\newframe
% Second Frame
\makebox[20mm][l]{kg}
\end{animateinline}
\end{document}

Update 1
Hi! I added some more examples, again, view in Adobe Reader! An "issue" is that you have to make sure that the first frame reserves the right amount of space. Therefore I use \strut but this is not always enough. Alternatively, you can use \vphantom, see the linked question/answer in the code for a more detailed explanation.
As you can tell from my code, I do not hold a CS degree :). This is a rather manual approach (hence my first name: Manuel :)).
\documentclass{article}
\usepackage{animate}
\usepackage{cancel}
\usepackage{xfrac}
\usepackage{siunitx}
% See https://tex.stackexchange.com/questions/81835 for more details.
\begin{document}
\section*{Example 1}
\begin{animateinline}[controls, step]{2}
\makebox[40mm][l]{\strut Step 1: kg x N/kg}
\newframe
\makebox[40mm][l]{\strut Step 2: \bcancel{kg} x N/\bcancel{kg} = N}
\newframe
\makebox[40mm][l]{\strut Step 3: N}
\end{animateinline}
\section*{Example 2}
\begin{animateinline}[controls, step]{2}
\makebox[40mm][l]{\strut Step 1: W x s}
\newframe
\makebox[40mm][l]{\strut Step 2: W x s = J}
\end{animateinline}
\section*{Example 3 (\texttt{siunitx} and \texttt{xfrac, sfrac})}
\begin{animateinline}[controls, step]{2}
\makebox[40mm][l]{\strut Step 1: $\si{kg}\times \sfrac{\si{\newton}}{\si{\kilo\gram}}$}
\newframe
\makebox[40mm][l]{\strut Step 2: $\bcancel{\si{\kilo\gram}}\times \sfrac{\si{\newton}}{\bcancel{\si{\kilo\gram}}}$}
\newframe
\makebox[40mm][l]{\strut Step 3: $\si{\newton}$}
\end{animateinline}
\end{document}

animatepackage (https://ctan.org/pkg/animate)? – Dr. Manuel Kuehner May 22 '21 at 22:17controlsto the options[autoplay ,loop]and you see what I mean. Maybe somebody else can provide a complete answer. – Dr. Manuel Kuehner May 22 '21 at 22:22