When $y\geq x^2$ we have that $f(x,y)=y-x\geq x^2-x\geq -\frac{1}{4}$. Since $-\frac{1}{4}$ is smaller than $0$ (the value of the function when $y<x^2$) it follows that the function $f(x,y)$ has a minimum at $=\frac{1}{2}$ which is equal to $-\frac{1}{4}$.
Is this correct? If yes, could we improve the justification?
About the maximum: In the first case, $y$ is greater than $x^2$, so I think that the value of the function can grow infinitely, i.e. it has no maximum. Is this correct? But how could we justify that formally?