Lets say that Pitcher A is pitching to Batter Y. Pitcher A gets the count to 2-1 and then the manager decides he's seen enough. He calls in Pitcher B who has had a lot of sucess against Batter Y. Of course, the other manager knows this and brings in Batter Z. Pitcher B gets a quick strike before throwing two way out of the strike zone.

Who walked who? Who is credited with giving up the walk and who is credited with receiving it?

Lets say that Pitcher A is pitching to Batter Y. Pitcher A gets the count to 1-2 and then the manager decides he's seen enough. He calls in Pitcher B who has had a lot of sucess against Batter Y. Of course, the other manager knows this and brings in Batter Z. Pitcher B gets a quick strike before throwing two way out of the strike zone.

Who walked who? Who is credited with giving up the walk and who is credited with receiving it?

With the count at 1-2 and Pitcher B throwing a quick strike, Pitcher B would have struck out Batter Z.

I believe Pitcher B and Batter Z would each get the walk regardless of the other players' efforts.

If, when pitchers are changed, the count is 2 balls, no strike, 2 balls, 1 strike, 3 balls, no strike, 3 balls, 1 strike, 3 balls, 2 strikes, and the batter gets a base on balls, charge that batter and the base on balls to the preceding pitcher, not to the relief pitcher

However, I am pretty sure that the batter that recieves the last couple of balls is credited with the walk.

In other words, I think that a batter does not have to face a pitcher and yet can recieve a walk from him. I think pitcher A is charged with a walk to batter Z.

Pitcher A gets the walk charged to him and Player Z gets credit for the walk.

If Pitcher B struck out hitter Z, though, that Pitcher B gets credit for the K and hitter Z is still charged with the strikeout.

In regards to the original questions:

Whoever actually scores the run gets credit for the run.

Whoever put the runner on base gets charged with the run, even if that runner gets replaced by another baserunner or hitter on a fielder's choice (since if not for the original baserunner, the subsequent hitter would not have reached base on the force out - he would have simply been out).

Now, if the reliever comes in, gets a DP and then walks the next hitter and this guy scores, the reliever gets charged with the run.