Yes (assuming $\max_y f(x,y)$ is defined for each fixed $x$.) We suppress the notation $Y(x)$ and just assume that all $x,y$ are taken to be in the domain of $f$. Suppose that $(x_0,y_0)$ maximizes $f$. Then $y = y_0$ maximizes $f(x_0,y)$, or else you could choose some $y_1$ with $f(x_0, y_1) > f(x_0, y_0)$, a contradiction. So $f(x_0, y_0) = \max_y f(x_0, y)$. Similarly, if there is $x_1$ with $\max_y f(x_1, y) > f(x_0, y_0)$ then there is $y_1$ with $f(x_1, y_1) > f(x_0, y_0)$, a contradiction. So $$f(x_0, y_0) = \max_x \max_y f(x,y).$$