Whenever we're solving for anything in a rational equation whether it be a parameter and we're dealing mostly with letters or a variable and we have numbers involved, what we want to do is to first get rid of our denominator and we do that by multiplying by our least common denominator.
Looking at our denominators here, they don't share any factors, so I know I want to then multiply both sides by x plus y times x minus y. Distributing this through, our x plus ys cancel from our first term leaving us with a times x minus y, and then our x minus ys cancel from the second leaving us with x plus y.
We're now trying to solve for x and what I see is that I have 2 xs involved, so what I need to do is to isolate them all to one side and before I actually do that I have to Foil, not Foil distribute everything through. So we end up with ax minus ay is equal to bx plus by. So what we want to do is get all the xs to one side and get everything else to the other, it doesn't really matter which side we bring it to, so I'm going to bring my xs to this side and the ys over to the other side, so we have ax minus bx is equal to by plus ay.
So now we want to get a single x, we have 2 xs right now, so we want 1 all we have to do is factor out the x, leaving us with x times a minus b is equal to by plus ay. To solve for x all we have to do is divide by the coefficient a minus b, a and b are just variables, so a minus b is just a variable as well it's just a different number we can just divide by leaving us with x is equal to by plus ay over a minus b. If you wanted do you could factor our a y from that numerator, you don't really need to what we've done is solve for x.
One thing I do want to note is that if you did bring everything to the other side, so I brought all my xs over to the left, if you brought all your xs over to the right, there's a chance that what you would have is actually these signs being opposite. You might end up with negative by minus ay over b minus a, that's perfectly fine if you factored out the -1, they would cancel and you would end up with the same thing.
So basically just by moving to their side, your answer is going to look a little bit different, but numerically mathematically it's always going to work out the same.
So whenever we're solving a rational equation of any kind, multiply by your least common denominator, Foil everything out if you have to, factor out what you're solving and then divide and you'll end up with your answer.