The idea here is that you're diluting the stock solution to a total volume of
$overbrace("5 mL")^(color(blue)("the volume of the stock solution")) + overbrace("300 mL")^(color(blue)("the volume of water")) = "305 mL"$
The thing to keep in mind about dilutions is that the ratio that exists between the volume of the diluted solution and the volume of the stock solution
$V_"diluted"/V_"stock"$
and the ratio that exists between the concentration of the stock solution and the concentration of the diluted solution
$c_"stock"/c_"diluted"$
must be equal. You can thus say that you have--here
$"DF" = c_"stock"/c_"diluted" = V_"diluted"/V_"stock"$
In your case, the dilution factor is
$"DF" = (305 color(red)(cancel(color(black)("mL"))))/(5color(red)(cancel(color(black)("mL")))) = color(blue)(61)$
which means that the concentration of the diluted sodium hydroxide solution is
$c_"diluted" = c_"stock"/color(blue)("DF")$
$c_"diluted" = "6 M"/color(blue)(61) = "0.0984 M"$
Now all you have to do is to use the volume of the solution to find the number of millimoles of sodium hydroxide present in the sample
$7.92 color(red)(cancel(color(black)("mL solution"))) * (0.0984 * color(blue)(cancel(color(black)(10^3)))color(white)(.)"mmoles NaOH")/(color(blue)(cancel(color(black)(10^3)))color(red)(cancel(color(black)("mL solution")))) = color(darkgreen)(ul(color(black)("0.8 mmoles NaOH")))$
The answer must be rounded to one .
Notice that this is exactly what your teacher calculated by doing
$"6 M"/"305 mL" * "5 mL" ~~ "0.1 M"$
because this is actually the concentration of the stock solution divided by the dilution factor
$"6 M"/("305 mL"/"5 mL") = "6 M"/"305 mL" * "5 mL"$