To find the value of x in a metal chloride MClx
$$\ce{MCl_x + xAgNO3 -&gt; xAgCl + M(NO3)_x}$$

$500$ mL of $0.8$ M is $0.4$ mol, so the mole ratio between $\ce{MCl_x}$ and $\ce{AgNO3}$ used is $1:4$.

From the equation above, the mole ratio is $1:x$.

Therefore, $1:x=1:4 \implies x=4$.