Complementary angles are two angles whose sum is 90 degrees. In this problem, we're given that the angles are 2x + 20 and 3x + 40, and we know that their sum is 90 degrees. So we can set up an equation:
2x + 20 + 3x + 40 = 90
Simplifying the left side of the equation by combining like terms, we get:
5x + 60 = 90
Subtracting 60 from both sides of the equation, we get:
5x = 30
Finally, dividing both sides of the equation by 5, we get:
x = 6
Therefore, the value of x is 6.