I am having trouble with this problem, and I think it is mainly because it involves implicit functions. I think that I have to find a equation for a line that is perpendicular to the plane that passes through the point x,y,z, and then somehow use that to plug something in the plane equations then solve for q, but I honestly don't know what to do. Any help would be fantastic

Suppose that you are given a point p = (x, y, z) and a plane nx + d = 0 where ||n|| = 1.
(a) Let q be the perpendicular projection of p onto the plane. Derive an expression of the location q in terms of
p, n, and d.