Let $K$ be a global field (e.g., a number field) and let $M_K$ be its set of absolute values. Further, let $\overline{K}$ be the algebraic closure of $K$ and denote by $M$ the set of absolute values on $\overline{K}$ extending those from $M_K$. For any absolute value $| \cdot |_v$ from $M$ we write $v(x) = - \log|x|_v$.
A positive $M_K$-constant $\gamma$ is a map $\gamma \colon M_K \to [0,\infty)$ such that $\gamma(v) = 0$ for all but finintely many $v \in M_K$. Every $M_K$-constant $\gamma$ can be extended to $M$ by letting $\gamma(v) := \gamma(v|_K)$.
Let $V = V(\overline{K})$ be an affine variety defined over $K$. A subset $B \subseteq V \times M$ is called affine $M_K$-bounded if there exists $U \subseteq V$ affine open with coordinates $x_1,...,x_n$ such that $B \subseteq U \times M$ and a positive $M_K$-constant $\gamma$ such that \begin{equation} \inf_{1 \leq i \leq n} v(x_i(P)) \geq - \gamma(v) \end{equation} holds for all $(P,v) \in B \times M$.
Let now $D$ be a positive divisor on $V$, and let $Q_1,...,Q_n$ be generators for the ideal corresponding to $D$ (via its sheaf of ideals) in the coordinate ring $\overline{K}[V]$. My goal is to prove that the local height function
$$\lambda_D \colon V \times M \to [0, \infty]$$
defined by $\lambda_D(P,v) = \inf_{1 \leq i \leq n} v(Q_i(P))$ has the following property:
Suppose that $U \subseteq V$ is affine open such that $D|_U = (f)$ is principal, and let $B \subseteq V \times M$ be affine $M_K$-bounded with respect to $U$. Then there exists a positive $M_K$-constant $\gamma$ such that $$\lambda_D(P,v) - \gamma(v) \leq v(f(P)) \leq \lambda_D(P,v) + \gamma(v)$$ holds for every $(P,v) \in B$.
Concerning the proof, I would proceed as follows: W.l.o.g. we assume that $U = V$, i.e., that $D = (f)$ is principal. Then the principal ideal generated by $f$ in $\overline{K}[V]$ equals the ideal $\langle Q_1,...,Q_n \rangle$, thus we find $S_i,R_i$ such that $Q_i = S_i f$ for every $1 \leq i \leq n$ and $R_1S_1 + ... + R_nS_n = 1$. Hence we conclude that $$\lambda_D(P,v) = \inf_{1 \leq i \leq n} v(Q_i(P)) = \inf_{1 \leq i \leq n} \big( v(f(P)) + v(S_i(P)) \big) $$ $$= v(f(P)) + \inf_{1 \leq i \leq n} v(S_i(P))$$ for every $(P,v) \in B$. Since the $S_i$ are just a different choice of affine coordinates, we can apply that $\inf_{1 \leq i \leq n} v(S_i(P)) \geq - \gamma(v)$ and thus arrive at $$\lambda_D(P,v) \geq v(f(P)) - \gamma(v)$$ for every $(P,v) \in B$, which is one of our desired inequalities.
However, I do not have any idea how to prove the other inequality, i.e., that $$\lambda_D(P,v) - \gamma(v) \leq v(f(P))$$ holds for every $(P,v) \in B$. Any help is appreciated!
[Edit: Note that this is not a homework problem. I just would like to figure out whether the proof of the existence of a local height function attached to $D$, as e.g. given in Lang's Fundamentals of Diophantine Geometry, can be simplified using the above explicit formula for $\lambda_D$ (and by extending it to projective varieties).]