Angle between A and B is theta.
So cos theta =vector A. Vector B/ |A| |B|
Cos theta = (2 - 1)/(underroot 10)
= 1/(underroot 10)
Scalar Projection of A along B is :
|A| cos theta = (underroot 5)/(underroot 10)
Direction is same as that of B.
That is B cap = (1/underroot 2)(i-j)
Scalar projection perpendicular to B is: |A| sin theta
U may calculate it similarly. It's direction is (1/underroot 2)(i+j).