Let P(x,y) be the point whose distance from x+2y+7=0 and 2x−y+8=0 is equal.
⇒5x+2y+7=±52x−y+8
⇒x2+4y2+49+4xy+28y+14x=4x2+y2+64−4xy−16y+32x
⇒−3x2+3y2−15+8xy+44y−18x=0
⇒3x2−3y2−8xy+18x−44y+15=0
⇒x2−y2−38xy+6x−344y+5=0
Now, on comparing x2−y2+2hxy+2gx+2fy+c=0 with above equation we get,
⇒h=3−4,g=3,f=−322,c=5
⇒g+c+h−f=3+5−34+322
⇒g+c+h−f=14