This is Weibel's K-book exercise 2.12
If $f : R →S $ is a homomorphism of commutative rings, there is a continuous map $f^*: Spec(S) → Spec(R)$ sending $p$ to $f^{-1}(p).$
If $P$ is a finitely generated projective R-module, show that rank$(P\otimes_R S)$ is the composition of $f^∗$ and rank$(P)$.
I don't know what's the mean of "composition of $f^∗$ and rank$(P)$."Since $P\otimes_R S$ can be viewed a $S(or\ R)$-module. I guess it means rank$(P\otimes_R S)$ calculated on some $q\in Spec S,$ then pulback to $R$. Right?
If you can tell me the correct meaning, I will thank you very much.
Citation from the exercises (Exercise 2.11): "$M$ is finitely generated,$M_p$ is free for every prime ideal $p$ of $R$, and $rank(M)$ is a continuous function on $Spec(R)$."
Hence
$$rank(-): Spec(R) \rightarrow \mathbb{Z}$$
is a continuous map.
Question: "If you can tell me the correct meaning, I will thank you very much."
Given a map $f:R \rightarrow S$ of commutative rings and corresponding map $f^*: Spec(S) \rightarrow Spec(R)$ of affine schemes, you get according to Ex.2.11 a composed map
$$ rank(-) \circ f^*: Spec(S) \rightarrow \mathbb{Z}.$$
I have not done the exercise, but it seems to me Weibel wants you to prove the formula
$$F1.\text{ }rank(\tilde{P\otimes_R S})=rank(f^*(\tilde{P}))$$
where $\tilde{P}$ is the sheafification of $P$. Hence it seems to me you must do Exercise 2.11 in the book and verify formula F1.