Consider two unknowns $y\in \mathcal{Y}$ and $s\in \mathcal{S}$. Let $f$ be a function of $(y,s)$. Let $g$ be a function of $s$.
Consider the following problem $$ \max_{y\in \mathcal{Y},s\in \mathcal{S}} f(y,s)-g(s) $$ Suppose that the maximisers are unique and denote them by $(y^*,s^*)$.
Consider now the following problem $$ \max_{y\in \mathcal{Y}} f(y,s^*) $$ Again, suppose that the maximiser is unique.
Question: is it true that $argmax_{y\in \mathcal{Y}}f(y,s^*)=y^*$?
Yes, it is true.
Suppose $y^* \neq \bar{y} \in \underset{y \in \mathcal{Y}}{\mathrm{arg\max}} \: f(y,s^*)$. Then we have by the optimality of $\bar{y}$: $$f(\bar{y},s^*) > f(y^*,s^*) \implies f(\bar{y},s^*) - g(s^*) > f(y^*,s^*) - g(s^*),$$ which contradicts the fact that $(y^*,s^*) \in \underset{(y,s) \in \mathcal{Y} \times \mathcal{S}}{\mathrm{arg\max}} \: f(y,s) - g(s)$.