The molarity is moles/liters.
First, convert 4,000 mL to L:
4000 mL --> 4 L
Now, you must convert the 17 g of solute to moles by dividing the number of grams by the molar mass. The molar mass of AgNO3 is 169.87 g/mol:
17 / 169.87 = .1
Now that you have both the number of moles and the liters, plug them into the initial equation of moles/liters:
.1/4 = .025