The first part of this question is quite general: let $X$ and $Y$ be noetherian integral separated schemes which are regular in codimension one. Is there any relationship between the divisor class group $\text{Cl}(X \times Y)$ and the groups $\text{Cl}(X)$, $\text{Cl}(Y)$? For instance, I think there are natural maps on divisors $\text{Div}(X) \to \text{Div}(X \times Y)$ and $\text{Div}(Y) \to \text{Div}(X \times Y)$ which send $Z \mapsto Z \times Y$ and $Z \mapsto X \times Z$. Are these maps well-defined modulo linear equivalence? If so, are the induced maps on class groups injective?
This question occurred to me while working on Hartshorne exercise II.6.1, which claims that $\text{Cl}(X \times \mathbb{P}^n) \cong \text{Cl}(X) \times \mathbb{Z}$. In this case, taking $H_{\infty} \subset \mathbb{P}^n$ to be the hyperplane at infinity, $Z = X \times H_{\infty}$, and $U = X \setminus Z$, there is a natural surjection $\text{Cl}(X \times \mathbb{P}^n) \to \text{Cl}(U) \cong \text{Cl}(X)$ whose kernel is the image of the map $\mathbb{Z} \to \text{Cl}(X \times \mathbb{P}^n)$ which sends $n \mapsto n \cdot Z$. Why is this map injective?