First, you have to understand how to solve the simple Poisson equation on a plane (conformally equivalent to sphere). The solution is a multiple of $\ln|z_1-z_2|$. This is the 2D counterpart of the 3D fact that the Laplace of $1/r$ is $-4\pi\delta^{(3)}(\vec r)$ and may be proved using the same Gauss' law proof.
The Laplace equation – one without the delta-function on the right hand side – has solutions that determine the ambiguity of the previous solution: some holomorphic and antiholomorphic functions that aren't even written down. Now, you may add the $X_0^2$ source on the right hand side, too. It's actually needed for the solution to be well-behaved at infinity so that the solution on the plane may be interpreted as a solution on $S^2$. Please verify that the solution he wrote down solves the equations. In general, there's no "quite straightforward" procedure to solve differential equations, of course. One can get better with some experience but it's unreasonable to assume that all these solutions may be found mechanically by following a "universal procedure how to solve differential equations". There isn't any.
The disk is conformally equivalent to a half-plane. The real axis is chosen to be the boundary in Joe's representation. The corresponding solution has an extra $\ln|z_1-\bar z_2|^2$ because one effectively adds the mirror charges at $z_2\to \bar z_2$ on the other side from the boundary, in order to have the right boundary conditions at the boundary so that it's a solution for the disk (half-plane) and not just the sphere (whole plane). Again, the sensible attitude is to verify it's a solution, including the delta-functions wherever they should be, and it has the right boundary conditions. One may also try to prove it's the most general solution. But that's it. There isn't any way to constructively converge towards the solution. One needs some experience, knowledge of what functions are solutions to some basic equations, and some experience with the way how similar or more complicated versions of these equations may be related to the simpler ones by substitutions and many other steps.
Similarly for the projective plane. However, now we have the identification $z_2\to -1/\bar z_2$ so the logarithm's argument could be $z_1+1/\bar z_2$ but if you multiply it by $\bar z_2$, which only depends on one variable, you get to his argument $1+z_1\bar z_2$. Again, you should verify that it's the solution with the right boundary conditions.
The dependence on $f$ drops in (6.2.17) due to the fact that $f$ reflects the dependence on $\omega$ but the theory is conformally invariant so the dependence on the conformal factor $\omega$ can't be there, especially because the potential sources of the conformal anomaly at the vertex operators and possibly at infinity have been canceled. That's the more conceptual explanation. There's really an explanation – an answer to your question – beneath the equation (6.2.17). You should however verify this "heuristic, intuitive, big-picture" argument by a direct calculation. It's possible because it's a Gaussian integral and all such integrals may be calculated analytically, especially if one has a prescription for the Green's functions. The calculation may take a page and because you apparently haven't even tried to start to calculate it, it seems pedagogically counterproductive to write the whole thing because such an answer would almost certainly open 100 of new questions.
One could be more detailed but at the end, one could also be forced to write a 5-times-inflated copy of Joe's huge 2-volume book supplemented by extra introductions to complex analysis, calculus, equations, integration, substitutions, and perhaps more elementary things you haven't specified. I won't do it because he's been writing the textbook for 10 years and 10 years times 5 equals 50 years and I don't think it's a sensible time investment given the fact that your questions don't seem localized at all.