Mesh current analysis voltage and current source
I decided to label the two loop currents differently, so that I avoid a conflict with your current source's designation:







simulate this circuit &ndash; Schematic created using CircuitLab

Just write out three equations:

$$\begin{align*}
0\:\text{V} - R_1\,I_A-R_2\,I_A-V_{I_1}-R_3\,I_1&amp;=0\:\text{V}\\\\
0\:\text{V}+R_3\,I_1+V_{I_1}-R_4\,I_B-10\:\text{V}&amp;=0\:\text{V}\\\\
I_1&amp;=I_A-I_B
\end{align*}$$

And solve for \$I_A\$, \$I_B\$, and \$V_{I_1}\$.

The main issue is getting the equations written out accurately. The introduction of \$V_{I_1}\$ as a new variable is because we don't know the voltage compliance required of the current source, \$I_1\$. Since it's unknown, using the mesh technique here you need to use KVL in the loop, you need a voltage there. So you create a new variable so that you have one to use.



You can do the solution using Sage (free program):

 var('r1 r2 r3 r4 ia ib vi1 i1')
 az=solve([Eq(-r1*ia-r2*ia-vi1-r3*i1,0),Eq(r3*i1+vi1-r4*ib-10,0),Eq(i1,ia-ib)],[vi1,ia,ib])
 az
{ia: (i1*r4 - 10)/(r1 + r2 + r4),
 ib: -(i1*(r1 + r2) + 10)/(r1 + r2 + r4),
 vi1: -(i1*r3*r4 + i1*r4*(r1 + r2) + (r1 + r2)*(i1*r3 - 10))/(r1 + r2 + r4)}

 az[vi1].subs({i1:.1,r1:7,r2:5,r3:2,r4:10})
4.70909090909091
 az[ia].subs({i1:.1,r1:7,r2:5,r3:2,r4:10})
-0.409090909090909
 az[ib].subs({i1:.1,r1:7,r2:5,r3:2,r4:10})
-0.509090909090909


The negative signs just mean the current directions are opposite the assumptions used to write out the equations.