To express #(x+22)/(x^2+2x-8)# in partial fractions, first let us factorize the denominator #(x^2+2x-8)#. This can be done as follows:
#x^2+2x-8=x^2+4x-2x-8)=x(x+4)-2(x+4)=(x-2)(x+4)#
Hence #(x+22)/(x^2+2x-8)# can be written as #(x+22)/((x-2)(x+4))#.
Let the partial fractions be #(x+22)/((x-2)(x+4))=A/(x-2)+B/(x+4)#
Simplifying RHS, we get #(A(x+4)+B(x-2))/((x-2)(x+4))# or
#((A+B)x+(4A-2B))/((x-2)(x+4))# and as this is equivalent to#(x+2)/((x-2)(x+4))#, we have
#A+B=1# and #4A-2B=22#. From first we get, #B=1-A# and putting this in second we get #4A-2(1-A)=22# or #6A=24# or #A=4# and hence #B=1-4=-3#
Hence partial fractions of #(x+2)/((x-2)(x+4))# are #4/(x-2)-3/(x+4)#