Let $a$ and $b$ be fixed points in the integer lattice, and let $f(p)$ be the probability that a random walk starting at the point $p$ will arrive at $a$ before $b$. Then for every point in the plane other than $a$ and $b$, we have,
$$
f(p) = \frac{f(p+i)+f(p-i)+f(p+j)+f(p-j)}{4}
$$
where $i$ and $j$ are the basis unit vectors. That is, the value of $f$ at a point is equal to the average of the values of $f$ at the neighboring points.
A function on the square lattice with this property is called harmonic, and satisfies a discrete version of Laplace's equation:
$$
\Delta f = 0
$$
where $\Delta$ is the discrete Laplace operator. Unfortunately, the function $f$ is not quite harmonic, since the equation above need not hold when $p=a$ or $p=b$.
In particular, the function $f$ actually satisfies the Poisson equation
$$
\Delta f(p) = C_1 \delta_a(p) + C_2 \delta_b(p),
$$
where $\delta_a$ is the function which is $1$ at $a$ and zero elsewhere, $\delta_b$ is the same for $b$, and $C_1$ and $C_2$ are unknown constants.
Since Poisonn's equation is linear, it suffices to solve the equations
$$
\Delta f(p) = \delta_a(p)\qquad\text{and}\qquad\Delta f(p) = \delta_b(p)
$$
independently, and then take an appropriate linear combination of the solutions. Solutions to equations such as these are called lattice Green's functions. For the integer lattice, the lattice Green's functions cannot be written in a closed form, but there are definite integral formulas that can be used to compute the function to arbitrary precision (see here).
Once you know the values of the lattice Green's functions, you ought to be able to solve for the constants $C_1$ and $C_2$ by using the boundary conditions $f(a) = 1$ and $f(b) = 0$.