\documentclass[tikz,border=2mm,12pt]{standalone}

\begin{document}
\begin{tikzpicture}[scale=1.5]
    % Define nodes with labels for the first graph
    \foreach \i/\label in {1/1, 2/2, 3/3, 4/5, 5/4}
    \node[circle, draw, inner sep=2pt] (node\i) at (\i*72:2cm) {\label};

    % Define edges with weights and colors for the first graph
    \foreach \source/\dest/\weight/\edgecolor in {1/5/-5/black, 2/5/5/black, 2/4/4/black, 3/4/34/black, 5/4/58/black}
    \draw[thick, \edgecolor] (node\source) -- node[midway, above, sloped] {\weight} (node\dest);

    % Draw an arrow
    \draw [->,thick] (3,0) -- (4.5,0);

    % Shift the position for the second graph
    \begin{scope}[xshift=7cm]
        % Define nodes with labels for the second graph
        \foreach \i/\label in {1/1, 2/2, 3/3, 4/5, 5/4}
        \node[circle, draw, inner sep=2pt] (node\i) at (\i*72:2cm) {\label};

        % Define edges with weights and colors for the second graph
        \foreach \source/\dest/\weight/\edgecolor in {1/5/(0)/black, 2/5/5/black, 2/4/4/black, 3/4/34/black, 5/4/58/red, 1/2/(0)/black,1/3/(0)/red,2/3/(0)/black,3/5/(0)/black,1/4/(0)/black}
        \draw[thick, \edgecolor] (node\source) -- node[midway, above, sloped] {\weight} (node\dest);
    \end{scope}
\end{tikzpicture}
\end{document}
