AB^2= (3-2)^2+(0-1)^2=2; AC^2=(2-1)^2+(1-5)^2=17; BC^2= (3-1)^2+(0-5)^2=29;
cos(A)=-(BC^2-AC^2-AB^2)/(2*AB*AC)=-(29-17-2)/(2*sqrt(17*2))=-5/sqrt(34);
AB^2= (3-2)^2+(0-1)^2=2; AC^2=(2-1)^2+(1-5)^2=17; BC^2= (3-1)^2+(0-5)^2=29;
cos(A)=-(BC^2-AC^2-AB^2)/(2*AB*AC)=-(29-17-2)/(2*sqrt(17*2))=-5/sqrt(34);