Question 1
There is a subtle trap here: we certainly have a group morphism $v_Y:K(X)^*\to \mathbb Z $ defined on rational functions but $s$ is not a rational function and the notation $v_Y(s)$ does not a priori make sense !
The key to this riddle is to choose a trivialization $\mathcal L|U \stackrel {\cong} {\to} \mathcal O_U$ on some open subset $U\subset X$.
The rational section $s|U\in \Gamma_{\text {rat }} (U,\mathcal L)$ will be transformed into a rational function $s'\in K(U)=K(X)$ and we define $v_Y(s):=v_Y(s')$.
This definition trivially does not depend on the trivialization.
[For ease of notation I have assumed the scheme $X$ integral. If it isn't, this construction must be adapted.]
The simplest example
Consider the point $p=(0:1)\in \mathbb P^1_{z:w}$ and the line bundle $\mathcal L=\mathcal O(p).$
(Recall that $\mathcal O(p)$ consists of rational functions having at most a pole of order one at $p$)
What is the divisor $div(s)$ associated to the section $s=1\in \Gamma(\mathbb P^1,\mathcal O(p))$ ?
Despite appearances it is not the zero divisor!
A trivialization $\mathcal L|U \stackrel {\cong} {\to} \mathcal O_U$ of our line bundle around $p$ over $U=\mathbb A^1_t$ is given by multiplication by $t=\frac zw$
So the constant function $1|U$ is transformed into the coordinate function $s'=t\in \Gamma(\mathbb A^1,\mathcal O)$ and since $v_p(t)=1$, we get finally $$div(s)=1\cdot p$$
Question 2
Write $\mathfrak p:=(x)\in \text {Spec} A$
(i) Since $x$ generates the maximal ideal $\mathfrak pA_\mathfrak p$ of the DVR $A_\mathfrak p$ we already have $$ v_\mathfrak p (x)=1 $$ (ii) Now consider some other prime $\mathfrak q\neq \mathfrak p$ of height one in $ \text {Spec} A$ .
We have $x\in A\subset A_\mathfrak q$ but I claim that $x\notin \mathfrak q A_\mathfrak q$.
Indeed if that were the case we would have $x\in \mathfrak qA_\mathfrak q \cap A=\mathfrak q$ and thus $(x)=\mathfrak p\subset \mathfrak q$.
This is absurd since different height one primes cannot be included in one another.
So in reality $x\in A_\mathfrak q\setminus \mathfrak q A_\mathfrak q $ and thus $$v_\mathfrak q(x)=0$$
From (i) and (ii) we conclude that, as desired, $$\text {div}(x)=1\cdot \mathfrak p=1\cdot (x) $$