Basic Circuit Analysis using Kirchhoff and Ohm's Laws
It looks like you got confused by the polarity of \$v_1\$. You can define a voltage to be whatever polarity you want, but that's just a notation thing. The physical polarity of the voltage across the component doesn't change. In the case of a resistor, the current always flows from higher voltage to lower voltage. This means \$v_1\$ is negative! Here's how the math works:

$$-v_1 + v_5 + v_2 = 24\ \mathrm V$$
$$v_1 = -i_5 \cdot 2\ \Omega$$
$$v_5 = i_5 \cdot 7\ \Omega$$
$$v_2 = i_5 \cdot 3\ \Omega$$

Note that both \$v_1\$'s value and the \$v_1\$ term in the KVL equation are negative. This gives us:

$$-(-2i_5) + 7i_5 + 3i_5 = 24$$
$$12i_5 = 24$$

So the answer is:

$$i_5 = 2\ \mathrm A$$

With practice, handling this sort of backwards polarity will become easy.