The exercise is given below.
$5.1.24.$ Let $X$ be an algebraic variety over a field $k$. Let $f : X \to Y := \mathbb{P}^{n}_{k}$ be a morphism of algebraic $k-$varieties. Let $\mathcal{L} = f^{*}\mathcal{O}_{Y}(1)$. Let $\sigma$ be an automorphism of $X$ such that $\sigma^{*}\mathcal{L} \simeq \mathcal{L}$. Show that there exists an automorphism $\sigma'$ of $Y$ such that $\sigma' \circ f = f \circ \sigma$.
From what I know, a $k-$ automorphism of $ \mathbb{P}^{n}_{k} $ comes from an automorphism of the graded $k-$ algebra $k[X_{1}, ..., X_{n}]$. With the hypothesis, if $g := f \circ \sigma $ we have $f^{*}\mathcal{O}_{Y}(1) = g^{*} \mathcal{O}_{Y}(1)$. From here I really don't know what to do. Any help would be appreciated.
Let $V = H^0(X, \mathcal L)$. Then the map $f$ corresponds to the quotient $$V \otimes \mathcal O_X \to \mathcal L \to 0,$$ so we can think of $f$ as a map $f: X \to \mathbb P(V)$¹.
Now choose an isomorphism $\varphi: \sigma^* \mathcal L \to \mathcal L$. This induces an isomorphism on global sections $\phi: V \to V$, which in turn induces an isomorphism $\sigma': \mathbb P(V) \to \mathbb P(V)$.
Now it remains to check that $\sigma'$ is compatible with $\sigma$. Can you do this on your own?
¹ I'm using Grothendieck's version of $\mathbb P(V)$ here, i.e. a point in $\mathbb P(V)$ is an equivalence class of quotients $V \to k \to 0$. Two quotients are equivalent iff they have the same kernel. The map $f$ then maps each closed point $x \in X$ to the quotient $[V \to \mathcal L_x \otimes_{\mathcal O_{X,x}} k(x) \to 0]$.