Step 1: The way to compute a vector perpendicular to two other vectors is to compute the cross product. That is, v = a X b will be perpendicular to both a and b.

Step 2: The projection of a onto b is given by the formula proj_{b}a = ((a dot b)/(|b|^2))b. Note that |b| is the magnitude of vector b. My notation above is a little tricky. The thing in parenthesis is multiplying vector b in the last expression.