a=a1i+a2j; b=b1i+b2j; |a|=sqrt(a1^2+a2b^2)=1; |b|=sqrt(b1^2+b2^2)=3.
|a-b|=|(a1-b1)i+(a2-b2)j|=sqrt((a1-b1)^2+(a2-b2)^2|=sqrt(7).
So a1^2-2a1b1+b1^2+a2^2-2a2b2+b2^2=7.
1-2a1b1+9-2a2b2=7; 2a1b1+2a2b2=3; a1b1+a2b2=3/2.
a·b=|a||b|cosC where C is the angle between them=3cosC=a1b1+a2b2=3/2, so cosC=1/2 and C=60 degrees.