A(3; 2; 1)
B(1; 2; 3)
CD(1; 1; 1)
---
AB = B - A = (1; 2; 3) - (3; 2; 1) = (1-3; 2-2; 3-1) = (1; 2; 3)
|CD| = √(1² + 1² + 1²) = √3
AB - CD = (1; 2; 3) - (1; 1; 1) = (0; 1; 2)
----------------
a(-3; -2; -1)
b(1; 2; -4)
-3a + 2b = -3(-3; -2; -1) + 2(1; 2; -4) = (9; 6; 3) + (2; 4; -8) = (11; 10; -5)
-----------------
найдём косинус угла через скалярное произведение
AB = B - A = (1; -2; 3)
|AB| = √(1 + 4 + 9) = √14
AC = C - A = (3; 0; 1)
|AC| = √(9 + 0 + 1) = √10
cos(∠A) = AB·AC/(|AB|*|AC|) = (1*3 - 2*0 + 3*1)/(√14√10) = 6/(√14√10) = 3/√35