have to find the scalar and vector projection of a=i-j+k and b=2i-j-2k
Is the word "and" supposed to be "onto" ?
In other words, what is being projected onto what?
Vector proj = (1/3)(i-j+k) = i/3 + j/3 + k/3
scalar proj = (1/9)(2i-j-2k) = 2i/9 - j/9 - 2k/9
These do not look correct.
A scalar projection is not a vector, so there should be no unit vectors i, j, or k in your answer for the scalar projection.
A scalar projection is a distance (not a directed line segment), so any scalar projection is just a Real number (i.e., a scalar).
Also, I would expect the factor 1/9 to be associated with the vector projection and the factor 1/3 to be associated with the scalar projection.