For lines to be perpendicular, their slopes have to be negative reciprocals of each other. (flip the sign +/- and the fraction(switch the numerator and the denominator))
For example:
Slope =
Perpendicular line's slope =
or -3 (flip the sign from + to -, flip fraction)
Slope = -2 or
Perpendicular line's slope =
(flip the sign from - to +, and flip the fraction)
The slope of line a is 3, so the slope of line b is