The algorithm followed when adding/subtracting fractions is:

The first step: we'll have to verify if the fractions have the same denominator.

If the answer is yes, we'll just have to add or subtract or multiply the terms from numerator.

If the answer is no, the next step is to calculate the least common denominator.

Let's work on an example, in the case when fractions don't have the same denominator:

2x/(x-4) + 2/(x+4) + (-2x^2 + 12)/(x^2 - 16)

In this case, the ratios don't have common denominator. We'll calculate it:

LCD = (x-4)(x+4)

We'll write the product (x-4)(x+4) = x^2 - 16 (diff. of squares)

We'll multiply each ratio by LCD.

2x(x^2 - 16)/(x-4) + 2(x^2 - 16)/(x+4) + (-2x^2 + 12)(x^2 - 16)/(x^2 - 16)

We'll simplify and we'll remove the brackets:

2x^2 + 8x + 2x - 8 - 2x^2 + 12

**We'll combine and eliminate like terms and we'll get:**

**10x + 4**