First put both equations in slope-intercept form to express the slope in terms of a.
Then multiply them together and set that product equal to -1 (The product of the slopes of two perpendicular lines is, for the most part, -1)
Then you solve for a using the quadratic formula or factoring.