Let R = the number of Republicans and D = the number of Democrats.
- there are 535 members of congress: R + D = 535
- there are 45 more republicans than democrats: R = D + 45
R + D = 535
R = D + 45
Substitute D+45 in place of R in the first equation:
R + D = 535
D + 45 + D = 535
2D + 45 = 535
2D = 490
D = 245
R = D + 45 = 245 + 45 = 290
Check:
R + D = 535
245 + 290 = 535
535 = 535
Check!