=(3x^2+9x+7)(x+1)/(x^2-1)-(2x^2+4x-3)(x-1)/(x^2-1)-(x^3+x+1)/(x^2-1)
=(3x^3+12x^2+16x+7)/(x^2-1)-(2x^3+2x^2-7x+3)/(x^2-1)-(x^3+x+1)/(x^2-1)
=(10x^2+22x+3)/(x^2-1)
=(3x^2+9x+7)(x+1)/(x^2-1)-(2x^2+4x-3)(x-1)/(x^2-1)-(x^3+x+1)/(x^2-1)
=(3x^3+12x^2+16x+7)/(x^2-1)-(2x^3+2x^2-7x+3)/(x^2-1)-(x^3+x+1)/(x^2-1)
=(10x^2+22x+3)/(x^2-1)