The dilution factor is 50.
The dilution factor is simply thwe ratio between the final volume of the solution and the nitial volume of the sample.
#color(blue)("DF" = V_"final"/V_"initial")#
In your case, you have 0.5 g of a solute that is disolved in 100 mL of solution.
Now comes the interesting part. Out of this solution, you take a 10-mL sample which you then dilute to a final volume of 500 mL.
The initial volume of the sample is 10 mL, the final volume of the solution is 500 mL, which means that the dilution factor is
#"DF" = V_"final"/V_"initial"#
#"DF" = (500color(red)(cancel(color(black)("mL"))))/(10color(red)(cancel(color(black)("mL")))) = color(green)(50)#
Now, don't get confused about the volume of the stock solution. When you dissolve 0.5 g of solute in 100 mL of water, you're not diluting anything, you're just making a solution.
The 10-mL sample of this solution would contain
#10color(red)(cancel(color(black)("mL"))) * "0.5 g solute"/(100color(red)(cancel(color(black)("mL")))) = "0.05 g solute"#
The final solution will contain the same amount of solute as the 10-mL sample, but the volume will now be 50 times greater. This means that you have the same amount of solute in 50 times the volume of solution