You must connect the 3.3V, just as indicated in the picture. You need to connect the VCC of the ST-link and the Grove - I2C Motor Driver (L298P) together.
I soldered male wires to the SWD and SWC pads for easy connection with female wires.