How do I formally show that the Zariski tangent space of the intersection of two closed subschemes is the intersection of the tangent spaces? I am looking for help in writing down the following formally/mathematically:

Let $(A, \frak p)$ be a local ring with $I \subset \frak p$ and $J \subset \frak p$.
The Zariski cotangent space of $A/I$ at $\frak p$ can be identified with $\frac{\frak p/\frak p^2}{(I+\frak p^2)/\frak p^2}$ which tells us that the tangent space of $A/I$ at $\frak p$ is a subspace of the tangent space of $A$ at $\frak p$. Similarly for the  closed subscheme cut out by $J$.
The cotangent space of $A/(I+J)$ at $\frak p$ can be identified with $\frac{\frak p/\frak p^2}{(I+J+\frak p^2)/\frak p^2}$.
Informally

*

*the tangent space of $A/I$ at $\frak p$ is cut out by the ideal $(I+\frak p^2)/\frak p^2$,

*the tangent space of $A/J$ at $\frak p$ is cut out by the ideal $(J+\frak p^2)/\frak p^2$,

*the tangent space of $A/(I+J)$ at $\frak p$ is cut out by the ideal $(I+J+\frak p^2)/\frak p^2$.

From this I gather that the intersection of the tangent spaces of $A/I$ and $A/J$ at $\frak p$ will be cut out by  the ideal $(I+J+\frak p^2)/\frak p^2$? Not sure how to really write this out.
Therefore, the tangent space of the intersection $\operatorname{Spec}A/I  \cap \operatorname{Spec} A/J=\operatorname{Spec}A/(I+J)$ at $\frak p$ is the intersection of the tangent spaces of $\operatorname{Spec}A/I$ and $\operatorname{Spec}A/J$ at $\frak p$.
 A: Call these $X = \mathrm{Spec}(A)$ and $Y = \mathrm{Spec}(A/I)$ and $Z = \mathrm{Spec}(A/J)$. Denote the point $\mathfrak{p} \in \mathrm{Spec}(A)$ by $x \in X$.
Dualizing with respect to the field $\kappa(x)$, your quotients gives inclusions $T_x Y \to T_x X$ and $T_x Y \to T_xX$. By the same argument we get a diagram of inclusions,
$\require{AMScd}$
\begin{CD}
T_x (Y \cap Z) @>>> T_x Y\\
@V V V @VV V\\
T_x Z @>>> T_x X
\end{CD}
and we want this to be an intersection. This is the same as asking for this diagram to be a pullback in vectorspaces but we won't really need this. Going back to the undualed versions (which I write as $T^*_x X = \mathfrak{m}_x / \mathfrak{m}_x^2$ etc to save space), the above diagram is an intersection if and only if the diagram,
$\require{AMScd}$
\begin{CD}
T^*_x (Y \cap Z) @<<< T^*_x Y\\
@AAA @AAA\\
T^*_x Z @<<< T^*_x X
\end{CD}
is a ``gluing diagram'' or pushout of vector spaces. Explicitly, this means it identifies $T^*_x(Y \cap Z)$ with $T_x^* Y \oplus T^*_x Z$ modulo the subspace generated by $(v,-v)$ for $v \in T_x^* X$.
See if you can show this explicitly (or verify the universal property if you prefer) in terms of ideals.
A: Question: "How do I formally show that the Zariski tangent space of the intersection of two closed subschemes is the intersection of the tangent spaces?"
Answer: For any ideals $I \subseteq I' \subseteq p \subseteq A$ there is a commutative diagram
$\require{AMScd}$
\begin{CD}
0 @>>> I @>>> p @>>> p_I:=p/I @>>> 0 \\
@VVV  @VV V    @VVV @VVV    \\
0 @>>> I' @>>> p @>>> p_{I'} @>>> 0
\end{CD}
This induce a canonical surjection
$$p_I/p_I^2 \rightarrow p_{I'}/p_{I'}^2$$
If $S:=Spec(A)$ and $U:=V(I), V:=V(J)$ with $\mathfrak{p} \in U \cap V$ it follows there are canonical surjections
$$A_{\mathfrak{p}} \rightarrow (A/I)_{\mathfrak{p}_I}$$
inducing surjections
$$ \mathfrak{p}/\mathfrak{p}^2 \rightarrow \mathfrak{p}_I/\mathfrak{p}_I^2 \rightarrow \mathfrak{p}_{I+J}/\mathfrak{p}_{I+J}^2$$
and
$$\mathfrak{p}/\mathfrak{p}^2 \rightarrow \mathfrak{p}_J/\mathfrak{p}_J^2 \rightarrow \mathfrak{p}_{I+J}/\mathfrak{p}_{I+J}^2.$$
When you dualize you get injections
$$(*)\text{  }T_\mathfrak{p}(U\cap V) \subseteq T_\mathfrak{p}(U) \subseteq T_\mathfrak{p}(S)$$
and
$$(**)\text{  }T_\mathfrak{p}(U\cap V) \subseteq T_\mathfrak{p}(V) \subseteq T_\mathfrak{p}(S)$$
and it follows you may intersect the vector spaces
$$T_\mathfrak{p}(U)\cap T_\mathfrak{p}(V) \text{ inside }T_\mathfrak{p}(S).$$
To intersect two vector spaces $V_1,V_1$ these vector spaces must be embedded into one common ambient vector space. The ambient vector space above is $T_{\mathfrak{p}}(S)$.
Hence you get a canonical inclusion of vector spaces
$$(***)\text{   }T_\mathfrak{p}(U\cap V) \subseteq  T_\mathfrak{p}(U)\cap T_\mathfrak{p}(V) .$$
Claim: "Therefore, the tangent space of the intersection $\operatorname{Spec}A/I  \cap \operatorname{Spec} A/J=\operatorname{Spec}A/(I+J)$ at $\frak p$ is the intersection of the tangent spaces of $\operatorname{Spec}A/I$ and $\operatorname{Spec}A/J$ at $\frak p$."
Example 1: Let  $k$ be the complex numbers and let $A:=k[x,y],f:=y^2-x^3, g:=y$ and $B:=A/(f), C:=A/(g)$ with $S:=Spec(A), C_1:=Spec(V), C_1:=Spec(C)$.
It follows $C_1\cap C_2:=Spec(k[x,y]/(y,x^3))\cong Spec(k[x]/(x^3)):=Spec(R)$.
The ring $R$ has a unique maximal ideal $\mathfrak{m}:=(x)$ and $R_{\mathfrak{m}} \cong R$ and $\mathfrak{m}/\mathfrak{m}^2 \cong k\overline{x}$ is one dimensional. Hence $Spec(R)$ is zero dimensional with a 1-dimensional tangent space at the point $0$ corresponding to $\mathfrak{m}$.
We get an equality
$$T_0(C_1)\cap T_0(C_2)=T_0(C_1\cap C_2):=T_0(Spec(R)) \subseteq T_0(\mathbb{A}^2).$$
Example 2: If you let $k$ have characteristic $p>0$ and let $I,J\subseteq k[x_1^p,..,x_1^p]$ be two ideals with $C_1:=V(I), C_2:=V(J)$ where $C_i$ are curves with zero dimensional intersection and $p\in C_1\cap C_2(k)$, it follows
$dim_k(T_p(C_1))=dim_k(T_p(C_2))=n$, hence $T_p(C_1)\cap T_p(C_2)$ has dimension $n$. The subscheme $C_1\cap C_2$ is zero dimensional and is defined by the ideal $I+J \subseteq k[x_1^p,..,x_n^p]$. For this reason it follows $dim_k(T_p(C_1 \cap C_2))=n$ hence there is an equality
$$T_p(C_1\cap C_2) = T_p(C_1) \cap T_p(C_2).$$
Note: When $A,B$ are $k$-algebras there is an isomorphism
$$P1.\text{  }\Omega^1_{A\otimes_k B/k} \cong \Omega^1_{A/k}\otimes_k B\oplus A\otimes_k \Omega^1_{B/k}.$$
Moreover if $k \rightarrow A \rightarrow A_i$ for $i=1,2$ are commutative unital rings, there is a surjection
$$0 \rightarrow I_{1,2} \rightarrow A_1\otimes_k A_2 \rightarrow A_1\otimes_A A_2 \rightarrow 0.$$
Note: When you take the intersection, you tensor over $A$, when you take the fiber product you tensor over $k$.  It follows there is a surjection
$$ A_1\otimes_A A_2\otimes_{A_1\otimes_k A_2} \otimes \Omega^1_{A_1\otimes_k A_2/k} \rightarrow \Omega^1_{A_1\otimes_A A_2/k} \rightarrow 0.$$
Hence there is a quotient map
$$\Omega^1_{A_1\otimes_A A_2/k} \cong \Omega^1_{A_1\otimes_k A_2/k}/I_{1,2}(\Omega^1_{A_1\otimes_k A_2/k}).$$
Example: Let $X:=Spec(A), Y:=Spec(A_1):=Spec(A/I), Z:=Spec(A_2):=Spec(A/J)$. It follows
$$Y\cap Z:=Y\times_X Z:=Spec(A_1\otimes_A A_2) \cong Spec(A/(I+J)).$$
When you dualize you get a sequence of injections
$$T(Y\cap Z/k)\cong T(Y\times_X Z/k) \subseteq T(Y\times_k Z/k) \cong p^*T(Y/k)\oplus q^*T(Z/k) \subseteq T(X/k).$$
where $p,q:Y\times_k \rightarrow Y,Z$ are the projection maps.
The fiber of this injection at $p$ is the inclusion of tangent spaces coming from $(*)$ and $(**)$ above.
In this link
Tangent space of a product of algebraic group.
you find a proof that for any point $(y,z)\in Y\times_k Z$ it follows
$$T_{(y,z)}(Y\times_k Z/k)\cong T_y(Y/k) \oplus T_z(Z/k).$$
Example: There are two interesting exercises in Hartshorne on this: Ex.I.5.3+5.4 on multiplicity, intersection multiplicity and tangent directions.
If $C_1,C_2 \subseteq S:=\mathbb{A}^2_k$ are two plane curves and assume $C_1 \cap C_2$ is a scheme supported at a point $P\in C_1 \cap C_2$. The result in the "exercise 12.1.C" implies the following: If $C_i$ have the same tangent direction at $P$, this should imply that $T_P(C_1\cap C_2/k)\cong ke$ is one dimensional. If $C_1$ and $C_2$ do not have the same tangent direction at $P$ this should imply that $T_P(C_1 \cap C_2)=(0)$. Hence the exercise is related to how the curves $C_i$ intersect at $P$ and Ex HH.I.5.3, 5.4 above.
Example: Let $f:=x,g:=y,C_1:=V(f), C_2:=V(g)$. It follows the tangents of $C_i$ are not parallell at $p:=(0,0)$, and moreover $C_1 \cap C_2:=Spec(k[x,y]/(x,y))\cong Spec(k)$ which has zero tangent space. If $f:=y-x^2, g:=y$, it follows $C_1 \cap C_2:=Spec(k[x,y]/(y,x^2)) \cong Spec(k[x]/(x^2))$ which has 1-dimensional tangent space. The curves have parallell tangents at $p$.
