A=i –2j B=-3i+j How do I find the component of A that is perpendicular to B in vector form?

A = i - 2 j so |A| = sqrt 5

B = -3 i + j so |B| = sqrt 10

The magnitude of the cross product A x B is |A| |B| sin T
where T is the angle between the vectors.
i j k
1 -2 0
-3 1 0 --> -5 k
so the magnitude of the cross product is 5
so
sqrt 5 * sqrt 10 * sin T = 5
5 sqrt 2 * sin T = 5
sin T = 1/sqrt 2
The component of A perpendicular to B, call it R, therefore has magnitude sqrt 5 /sqrt 2
We know that it is perpendicular to B so
B dot R has magnitude = 0
so
Rx Bx + RyBy = 0
Rx(-3)+ Ry(1) = 0
so Ry = 3 Rx
so call it
R = c Rx + 3c Ry where c is a constant
magnitude = c sqrt (10)
which has to be sqrt 5/sqrt 2
so c sqrt 10 = sqrt 5/sqrt 2
c = sqrt 5 /(sqrt 2*sqrt 2 * sqrt 5)
c = 1/2 but it could be negative
so our vector is
R = (1/2) i + (3/2) j
or
R = -(1/2) i - (3/2) j
looking at a sketch of the vectors, use the second one but both are valid.