Two complementary angles will add up to 90 degrees and two supplementary angles will add up to 180 degrees.
x + y = 90
Solve for y.
x + y = 90
y = 90 - x <-- Subtract x from each side
x + y = 180
Solve for y.
x + y = 180
y = 180 - x <-- Subtract x from each side