Each plane will have an equation of the form $Ex + Fy + Gz = H$ for some constants $E$, $F$, $G$, and $H$; a point will lie in the intersection of both planes if and only if it satisfies both equations at the same time, so you'll want to find all solutions to a system of two equations in three unknowns. The set of solutions will give you the line.
To find the equation for a plane given three points that are not collinear, $P$, $Q$, and $R$, you first find the normal vector to the plane. This is a vector that is perpendicular to any vector in the plane. Simplest way to find it is to find two non-collinear vectors that lie in the plane, for example, the vectors $\mathbf{v}_1 = P-Q$ and $\mathbf{v}_2 = R-Q$. With those two vectors, you can compute the normal vector of the plane with $\mathbf{n}=\mathbf{v}_1\times \mathbf{v}_2$ (cross product). If $\mathbf{n}=(a,b,c)$, then the equation of the plane is of the form $ax+by+cz = d$ for some constant $d$. Use the points that are in the plane to find the value of $d$.
You do this for each of the planes; this gives you the two equations of the planes. Then solve the system you get from the two equations; this gives you the line of intersection.