Suppose that $X_1,X_2$ are closed subsets of $Spec A$. There exists $v_1,v_2\in A$ such that $v_1+v_2=1,v_1v_2=0$ and $v_i(x)=0$ for all $x\in X_i,i=1,2$. Prove that there exist $A_1,A_2$ such that $A = A_1 \oplus A_2$ with $X_i= $ $^{a}\varphi(Spec(A_i)), \ i=1,2$.
What I think is that let $A_i=A/(u_i)$ and in this way we have $Spec(A/(u_i))=V(u_i)$ which is closed in $SpecA$. Since $A=(u_1)+(u_2)$, then we need to show that $(u_1)\cap(u_2)=\emptyset$ and then $A=A/(u_1)\oplus A/(u_2)$. But I don't know how to show $(u_1)\cap(u_2)=\emptyset$. Please help. Thanks!