And if you want to know why the voltage must be the same between the same two nodes, the reason is that the only field we're dealing with here is an electric field set up by the charges on the capacitor plates. But an electric field is a conservative field, meaning that if we take a test charge between two points, A and B, in the field, the work done by the field on the charge is the same for whichever route we go from A to B. So the work done on the test charge per unit charge it carries, i.e. the potential difference or voltage, is the same for all routes. In your case the routes of interest are via the capacitor and via the resistor!