One way to model this could be to use the distance from the line:
$$
x+y=0
$$
through $(0,0)$. This line has normal vector:
$$
\vec n=
\begin{pmatrix}
1\\
1
\end{pmatrix}
$$
and the distance of a given point $(x,y)$ to this line is proportional to $t=\vec n\cdot\langle x,y \rangle=x+y$ so in case we want something like:
$$
f(5,5)=5\\
f(5,0)=4\\
f(0,0)=0
$$
we can connect this to a single dimensional function:
$$
f(x,y)=g(x+y)
$$
where
$$
g(10)=5\\
g(5)=4\\
g(0)=0
$$
A way to achieve this could be to add the extra requirement $g'(10)=0$ so that $f$ has maximum at $(x,y)=(5,5)$ and build $g(0)=0$ in:
$$
g(t)=at^3+bt^2+ct
$$
Hence
$$
\begin{align}
g(10)&=1000a+100b+10c&&=5\\
g(5)&=125a+25b+5c&&=4\\
g'(10)&=300a+20b+c&&=0
\end{align}
$$
which can be solved for $a,b,c$ to have:
$$
f(x,y)=g(x+y)=0.002(x+y)^3-0.09(x+y)^2+1.2(x+y)
$$
See this link to look at interactive GeoGebra-applet with 3D-plot of this function
ADDENDUM: As can be seen both from the other answer and from comments, there will be (infinitely) many ways to satisfy your requirements, but to point you towards handling the additional requirement stated in your comment below this post, you could simply add a modifier to the above solution which takes the distance to the perpendicular line:
$$
x-y=0
$$
as input. This distance is (similarly) proportional to $t=x-y$, and so we need a modifier function $m(x,y)=h(x-y)=h(t)$ that satisfies:
$$
h(0)=0\\
h(5)=m(5,0)\\
h(-5)=m(0,5)
$$
so just choose which modification you want at $(5,0)$ and $(0,5)$ and match for instance a quadratic function as $h$:
$$
h(t)=\alpha t^2+\beta t+\gamma
$$
and combine:
$$
\begin{align}
q(x,y) &=f(x,y)+m(x,y)\\
&=g(x+y)+h(x-y)\\
&=a(x+y)^3+b(x+y)^2+c(x+y)+\alpha(x-y)^2+\beta(x-y)+\gamma
\end{align}
$$
but be a little careful - if $h(t)$ increases too rapidly away from $h(0)$ to one side, then $q$ may exceed a value of $5$.
Here is GeoGebra-applet with example of this technique