Help understanding simple OP-Amp
Because the inverting (-) input is at 0V (a virtual ground), the voltage across R1 is:

$$V_{in} - 0 = V_{in}$$

By the same reasoning, the voltage across R2 is:

$$V_{out} - 0 = V_{out}$$

The thing that might not be so obvious is that if \$V_{in}\$ is positive, \$V_{out}\$ will be negative. In that case the current flows straight from \$V_{in}\$ to \$V_{out}\$, passing through R1 and R2. The inverting input draws no current, so all current must flow from in to out, and through the resistors.

So as an example, say \$V_{in}\$ is 1V, R1 is 100Ω and R2 is 200Ω. Then \$V_{out}\$ will be -2V by your formula, the difference between \$V_{in}\$ and \$V_{out}\$ is 3V, dropped across a total of 300Ω, gives a current of 10mA from in to out through R1 and R2.