When is
$$ \min_{x\in X,y\in Y}f(x,y)=\min_{x\in X}(\min_{y\in Y}f(x,y))? $$
When is
$$ \min_{x\in X,y\in Y}f(x,y)=\min_{x\in X}(\min_{y\in Y}f(x,y))? $$
Let $f:X \times Y \to \mathbb{R}$, and let us prove that $$\inf_{(x,y)\in X \times Y}f(x,y) = \inf_{x \in X}\left( \inf_{y \in Y}f(x,y)\right).$$ Therefore by definition of the infimum we have a sequence $(x_n) \subset X$ such that $$\lim_{n \to \infty} \left(\inf_{y \in Y} f(x_n,y)\right) =\inf_{x\in X}\left( \inf_{y \in Y} f(x,y)\right),$$ furthermore for every $n \in \mathbb{N}$, there is some sequence $(y_m^n) \subset Y$ such that $$\lim_{m \to \infty} f(x_n,y^n_m) = \inf_{y \in Y} f(x_n,y).$$ Now, note that $$f(x_n,y_m^n) \geq \inf_{(x,y)\in X \times Y}f(x,y)$$ for every $m,n \in \mathbb{N}$ and thus $$ \inf_{x \in X} \left(\inf_{y\in Y}f(x,y)\right) =\lim_{n \to \infty}\left(\lim_{m \to \infty}f(x_n,y^n_m)\right) \geq \lim_{n \to \infty} \left( \lim_{m \to \infty} \inf_{(x,y)\in X\times Y}f(x,y) \right) = \inf_{(x,y)\in X \times Y}f(x,y).$$ Still using the definition of the infimum, we have the existence of a sequence $(x_k,y_k) \subset X \times Y$ such that $$ \inf_{(x,y)\in X \times Y}f(x,y) =\lim_{k \to \infty}f(x_k,y_k),$$ but note that for every $k \in \mathbb{N}$ we have $$f(x_k,y_k) \geq \inf_{y \in Y}f(x_k,y) \geq \inf_{x \in X} \left( \inf_{y \in Y}f(x,y)\right).$$ It finally follows that $$\inf_{(x,y)\in X \times Y}f(x,y) = \lim_{k \to \infty}f(x_k,y_k) \geq \lim_{k \to \infty}\inf_{x \in X}\left( \inf_{y \in Y}f(x,y)\right)=\inf_{x \in X}\left( \inf_{y \in Y}f(x,y)\right),$$ which proves the first statement. Now, if for every $z \in X$, $\min_{(x,y)\in X \times Y}f(x,y), \min_{y \in Y}f(z,y)$ and $\min_{x\in X} \left( \min_{y\in Y} f(x,y)\right)$ exist, $$\min_{(x,y)\in X \times Y}f(x,y)= \inf_{(x,y)\in X \times Y}f(x,y), \\ \min_{y \in Y}f(z,y)=\inf_{y \in Y}f(z,y),\\ \min_{x\in X} \left( \min_{y\in Y} f(x,y)\right)=\inf_{x\in X} \left( \inf_{y\in Y} f(x,y)\right)$$ and your result follows directly.
This equation is always true.
You proof this by contradiction:
1) It is clear that $$\min_{x\in X,y\in Y}f(x,y)>\min_{x\in X}(\min_{y\in Y}f(x,y))$$ cannot hold true.
2) Let us assume $$\min_{x\in X,y\in Y}f(x,y)<\min_{x\in X}(\min_{y\in Y}f(x,y))$$ and let $x^\star $ and $y^\star $ minimizer.
Now, suppose you search over all possible $x$ for the smallest value of $\min_{y\in Y}f(x,y))$ and suppose that for each $x$ you can find the optimal $y$.
Then, choosing $x^\star$ will give you $y^\star$ and you arrive at $\min_{x\in X,y\in Y}f(x,y)$
As 1) and 2) cannot be true, you can conclude that equality holds always.