Let $X:=Spa A$ be an affinoid adic space, and $\underline X $ the ringed space of $X$. Let $Y:=Spec B$ be an affine scheme, $f: \underline X \longrightarrow Y$ a morphism of ringed spaces.

How to define a morphism of rings $g: B \longrightarrow A$ such that $f$ is induced by $g$?