[guided]Because the primal optimum is finite and attained at $\bar{x}$, the perturbation value at the origin is finite:
\begin{align*}
p(0)=f(\bar{x})+g(A\bar{x})=v.
\end{align*}
We verify properness again inside the guided argument. The function $p$ is convex, $0\in\operatorname{ri}(\operatorname{dom}p)$, and $p(0)$ is finite. If there were $u_1\in\operatorname{dom}p$ with $p(u_1)=-\infty$, then the definition of relative interior would give $u_2\in\operatorname{dom}p$ and $\lambda\in(0,1)$ such that
\begin{align*}
0=\lambda u_1+(1-\lambda)u_2.
\end{align*}
Convexity would imply
\begin{align*}
p(0)\leq \lambda p(u_1)+(1-\lambda)p(u_2)=-\infty,
\end{align*}
contradicting the finiteness of $p(0)$. Hence $p$ is a proper convex function and never takes the value $-\infty$. Since $0\in\operatorname{ri}(\operatorname{dom}p)$, the finite-dimensional subgradient existence theorem for proper convex functions applies at $0$, and this theorem does not require closedness of $p$. Thus there exists $\bar{y}\in\mathbb{R}^m$ such that
\begin{align*}
p(u)\geq p(0)+\langle \bar{y},u\rangle
\end{align*}
for every $u\in\mathbb{R}^m$.
This inequality says exactly that $\bar{y}$ supports the perturbation value function at the unperturbed problem. Substituting it into the definition of the conjugate gives
\begin{align*}
p^*(\bar{y})=\sup_{u\in\mathbb{R}^m}\{\langle \bar{y},u\rangle-p(u)\}\leq -p(0).
\end{align*}
Taking $u=0$ in the supremum gives the reverse inequality, so
\begin{align*}
p^*(\bar{y})=-p(0).
\end{align*}
For completeness, recompute the conjugate identity at $\bar{y}$. By definition of $p$,
\begin{align*}
p^*(\bar{y})=\sup_{u\in\mathbb{R}^m}\sup_{x\in\mathbb{R}^n}\{\langle\bar{y},u\rangle-f(x)-g(Ax+u)\}.
\end{align*}
For fixed $x$, set $z=Ax+u$, so $z$ ranges over all of $\mathbb{R}^m$ and $u=z-Ax$. Using $\langle\bar{y},Ax\rangle=\langle A^\top\bar{y},x\rangle$, we obtain
\begin{align*}
p^*(\bar{y})=\sup_{x\in\mathbb{R}^n}\{\langle-A^\top\bar{y},x\rangle-f(x)\}+\sup_{z\in\mathbb{R}^m}\{\langle\bar{y},z\rangle-g(z)\}.
\end{align*}
Therefore
\begin{align*}
p^*(\bar{y})=f^*(-A^\top\bar{y})+g^*(\bar{y}).
\end{align*}
Combining this with $p^*(\bar{y})=-p(0)$ gives
\begin{align*}
-f^*(-A^\top\bar{y})-g^*(\bar{y})=p(0)=v.
\end{align*}
Thus $\bar{y}$ attains the dual supremum.
It remains to translate dual attainment into the certificate conditions. Since $\bar{x}$ is primal optimal and $\bar{y}$ is dual optimal,
\begin{align*}
f(\bar{x})+g(A\bar{x})+f^*(-A^\top\bar{y})+g^*(\bar{y})=0.
\end{align*}
The Fenchel inequalities give two nonnegative terms:
\begin{align*}
f(\bar{x})+f^*(-A^\top\bar{y})-\langle -A^\top\bar{y},\bar{x}\rangle\geq0
\end{align*}
and
\begin{align*}
g(A\bar{x})+g^*(\bar{y})-\langle\bar{y},A\bar{x}\rangle\geq0.
\end{align*}
Their sum is zero because $\langle -A^\top\bar{y},\bar{x}\rangle+\langle\bar{y},A\bar{x}\rangle=0$. A sum of two nonnegative [real numbers](/page/Real%20Numbers) is zero only when both are zero. Equality in Fenchel's inequality is equivalent to subdifferential membership, so
\begin{align*}
-A^\top\bar{y}\in\partial f(\bar{x})
\end{align*}
and
\begin{align*}
\bar{y}\in\partial g(A\bar{x}).
\end{align*}
These are the dual certificate conditions.[/guided]