How should exactly the brake cable be fixed to V-brake caliper?
Picture 2 is correct. The washer should prevent the cable being damaged or pulled by tightening the bolt.
However, on some cheaper brakes the bolt and washer are such poor quality that they turn together and the benefit is lost.
I will add that your cable in picture 2 isn't seated deeply enough behind the washer.

Note that i usually leave more cable and tuck it away behind the spring. This photo is OK for reference to clamping though.