I found an exercise of mine, that I solved, but now I am not sure anymore about the details, and some parts of what I wanted to say there.
I have the affine open sets $V_{1}, ..., V_{m}$ and $\varphi^{-1}(V_{i})$ is affine in $X$ for $\varphi:X\to Y$.
The exercise is to show, that $\varphi$ is affine.
So I took an arbitrary open $W$ in $Y$. So we have that for every $w\in W$ there is an $V_{i}$ that contains $w$. Than I chose $h\in A(V)$ such that $D_{V}(h)\subset W$.
$\to$ Here I am not anymore sure why this should hold. Is it wrong? Or why should for an arbitrary $W$ hold this property? I thought I might better take the union of all the $V_{i}$ that contain some $w$? But then I am not sure if the rest of my proof works. So for the further proof I still talk about the above $W$.
If this holds, we have an inclusion $\psi:D_{V}(h)\hookrightarrow W$ that corresponds to the homomorphism $\psi^*: A(W)\hookrightarrow A(V)[\frac{1}{h}]$ by $\mu\mapsto\psi^*\mu$.
We know $D_{V}(h)$ us open and so its dense. Then $\psi^*$ is injective.
Then we take an $f\in A(W)$ such that $w\in D_{W}(f)\subset D_{V}(h)$ $(*)$.
$\to$ Here I also don't see any more why there should be such $f$ that $(*)$ holds.
I then showed that $D_{V}(f\cdot h) \subseteq D_{W}(f)$
Because then $D_{V}(\psi^*\mu h^{m})=D_{W}(\mu)$ and $A(W)_{f}\overset{\sim}{\to}A(V)_{f}h^{m}$.
$\to$ here I don't see where I got the $h^m$ from.
Then $\varphi$ is affine on an open $U$ and $f\in A(U)=\mathscr{O}_{Y}(U)$ we get $\varphi$ is affine on $D_{U}(f)$. ($\to$ Why does that hold?)
Since $\varphi$ is affine on $V$ this implies that $\varphi$ is affine on $D_{V}(f\cdot h^m)=D_{W}(f)$.
So for $D(f)\subset W$ a basic open holds $\varphi^{-1}(D(f))\subset \varphi^{-1}(W)$ is affine and thus $\varphi$ affine on $D(f)$.
We repeat this process finitely many times. Finitely, since $W$
is a noetherian topological space
By $W=\bigcup\limits_{i=1}^{s} D_{W}(f_{i})$ we get a cover of affine open subsets and $\varphi$ affine over each $D_{W}(f_{i}).$
So $\varphi^{-1}(W)=\bigcup\limits_{i=1}^{s} \varphi^{-1}(D_{W}(f_{i}))=\bigcup\limits_{i=1}^{s}D_{\varphi^{-1}(W)}(\varphi^* f_{i}).$
With a proposition and a little proof that $\mathscr{O}(\varphi^{-1}(W))=(\varphi^* f_{1}, ..., \varphi^* f_{s})$ I found out that $\varphi^{-1}(W)$ is indeed affine
I hope someone can help me with the 'arrow-questions' :) Thanks and best!