Given a triangle in 3d space ABC, we know it's normal is
n =(B-A)x(C-A)
We also know that a point r in the plane of the triangle satifies
n.(r - A) = 0
Since we know two of the coordinates of r, we can rearrange to calculate the missing third coordinate.
Expand the brackets
n.r - n.A = 0
Add n.A to both sides
n.r = n.A
Expand left hand dot product
nx*rx + ny*ry + nz*rz = n.A
And rearrange to get rz
nz*rz = n.A cm - nx*r - ny*ry
rz = (n.A - nx*rx - ny*ry)/nz