It seems like a gave a "proof" of the following statement:
Any morphisms of affine schemes is affine. $\qquad \qquad \qquad \qquad (*)$
However, since affineness of morphisms can be checked locally, it would follow that every morphism would be affine, which is absurd. Can you please point out where I made a mistake?
"Proof" of $(*)$
Let $R \stackrel{\phi}{\to} A$ be a map of rings inducing $\text{Spec}(A) \stackrel{\psi}{\to} \text{Spec}(R)$. Since affineness can be checked on a cover, let us use the cover $\{ D_R(f) \ | \ f \in R\}$ where $D_R(f) = \{ \mathfrak{p} \subseteq R \ | \ f \notin \mathfrak{p}\}$. I claim that $\psi^{-1}(D_R(f)) \ = \ D_A(\phi(f))$ for any $f \in R$. In deed: $$ \psi^{-1}(D_R(f)) \ = \ \{ \mathfrak{p} \subseteq A \ | \ \phi^{-1}(\mathfrak{p}) \not \ni f\} \ = \ \{ \mathfrak{p} \subseteq A \ | \ \mathfrak{p} \not \ni \phi(f)\}\ \ = \ D_A(\phi(f)). $$
It is true that any morphism between affine schemes is affine, and it is also true that affineness can be checked locally on the target. It does not follow that every morphism is affine, and I don't know what argument you have in mind that would show this.