The first thermodynamics in the world with regard to hemoglobin (4).

About logP which is the logarithm of partition coefficient(P).

The partition coefficient(P) is the distribution ratio of the solute between octanol(org) and pure water(aq).
P(the partition coefficient) = Porg/Paq   logP is its logarithm.
When the partition coefficients are equal, logP = log1 = 0
The value of logP is negative due to the increase of affinity between solute and water.

The logarithm of partition coefficient and the value of Gibbs energy.

When the difference between the Gibbs energy of solute in org layer and one in aqueous layer is ⊿rG₀, the following equation is established between ⊿rG₀ and logP.
ΔrG₀ =rG₀(org)ーrG₀(aq)
ΔrG₀ = ーRTlnP = ー2.3 RT logP

(In my mind, P = exp{ーΔrG₀/RT} is easier to understand.)
It is possible to evaluate the variation of ΔrG₀ of the solute according to pH fluctuations.

The pH value of a solution and the pKa value and ΔG₀ of a solute 

In this case, the pKa value of solute is important.
When the solute is an amphoteric ion, the pH value of isoelectric point (pl) is the pKa value. (The same shall apply heteinafter.)
In chemical changes involving multiple substances, you can evaluate the variation of ΔrG₀total which is the sum of changes in Gibbs energy value.
However this ΔrG₀ doesn't directry represent the Gibbs energy value of solute in the aqueous layer, 
it's a value that assumes the existence of an org layer in addition to the solute and aq layer.
It's still a value that reflects the Gibbs energy value of solute in the aqueous layer, it isn't unrelated to the Gibbs energy value of solute in the aqueous layer.
Since this ΔrG₀ is closely related to the Gibbs energy value of solute in the aqueous layer, it is possible to evaluate the relative change in the Gibbs energy value of solute in aqueous layer.  (An absolute rating can be given later.)
As for the delivery of oxigen molecules to the ends of tissues of body, it is sufficient to understand the relative valuatioin.
Adding an acid or base to pure water causes fluctuations in the affinity between solutes and water.
Since we are discussing an amphoteric ion , the pKa value is the pH value of isoelectric point(pl).
The logP value and ΔG₀ of a solute that is an amphoteric ion having a pKa value(pl) are given by the following formula.
logP = logP₀ー | pKa ー pH |
ΔrG₀ = ー2.3 RT( logP₀ ー | pKa ー pH | )
When the pH value of aq layer becomes the same as the pKa value of solute that is an amphoteric ion, the logP value of solute which is an amphoteric ion is the logP₀ value.
As it can be seen from the graph, the logP₀ value of solute which is an amphoteric ion is the maximum logP value of solute which is the amphoteric  

Fig-1 makes it easier for you to understand mentioned above.