Let's take a walking tour through the circuit. Starting with the left hand loop at it's bottom left hand corner (where the "I1" label is located). Walking clockwise we first encounter a 12V voltage supply, and have to "walk up" the increasing voltage (- to +). So we mark that down:
+12V
Next we encounter a 5Ω resistor. Since we're walking in the same direction as the current that's been indicated (I1), we'll be "walking downhill" with the current, and there will be a voltage drop of I1*5Ω. So mark that down:
+12V - I1*5Ω
Next we turn the corner into the middle branch (where the current is now I2 in the direction of our walk), and encounter first another battery. This time we first meet the + terminal and will therefore be "walking downhill" as we traverse it. So a voltage drop of 6V is indicated:
+12V - I1*5Ω - 6V
Next in line is the 10Ω resistor. We are "walking" in the same direction as the indicated current I2, so there will be a voltage drop traversing the resistance of I2*10Ω. Mark it down:
+12V - I1*5Ω - 6V - I2*10Ω
Since we're now back where we started from, KVL says we should have a net "elevation" change of zero, so the equation for the first loop is:
+12V - I1*5Ω - 6V - I2*10Ω = 0
Combining the voltage terms:
6V - I1*5Ω - I2*10Ω = 0
Remember to keep the chosen current directions in mind; you're either walking with the current or against it. If you're walking with the current, traversing a current means a voltage drop. If you're walking against the current, then you are climbing up the slope that current's running down and there is a voltage rise across the resistance.
Can you produce a similar "walking tour" for the second loop?