Let x and y be the number of hotdogs and nachos that had been sold, respectively. Therefore,
[tex]5x+4y=317[/tex]Furthermore,
[tex]x+y=71[/tex]Then, solving for x, x=71-y.
Substitute into the first equation,
[tex]\begin{gathered} \Rightarrow5(71-y)+4y=317 \\ \Rightarrow355-5y+4y=317 \\ \Rightarrow y=38 \end{gathered}[/tex]And, solving for x,
[tex]\begin{gathered} \Rightarrow x=71-38=33 \\ \Rightarrow x=33 \end{gathered}[/tex]33 hotdogs were sold.