If a line has direction ratios 2, – 1, – 2, then what are its direction cosines ?

Find the scalar components of the vector with initial point A(2,1) and terminal point B (– 5, 7).
If A = {1, 2, 3}, B = {4, 5, 6, 7} and f = {(1, 4), (2, 5),(3, 6)} is a function from A to B. State whether f is one-one or not.