We have 2 numbers. We can call them x and y, being x the smaller one.
The sum of this two numbers is 40, so we can write:
![x+y=40](https://img.qammunity.org/2023/formulas/mathematics/college/j93uzjugko9p6bq84tknqqo4f7rzel0a40.png)
We know that if 2 is added to the larger number (that we name as y), the result is twice the smaller number, that would be 2x. Then, we can express this as:
![y+2=2x](https://img.qammunity.org/2023/formulas/mathematics/college/e9ouyrm01a337750tn4obwnthp2ul0igm7.png)
We can express y in function of x from the second equation and then replace it in the first equation to solve for x:
![y+2=2x\Rightarrow y=2x-2](https://img.qammunity.org/2023/formulas/mathematics/college/nmoh4dygf1552wi029j6gik16wverd9lli.png)
![\begin{gathered} x+y=40 \\ x+(2x-2)=40 \\ 3x-2=40 \\ 3x=40+2 \\ 3x=42 \\ x=(42)/(3) \\ x=14 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/1ymd5xpmtmfxot4j8fs40rsjwahd8pfr8i.png)
Now, we can calculate y as:
![\begin{gathered} y=2x-2 \\ y=2(14)-2 \\ y=28-2 \\ y=26 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/v6k53j8pgjqx7gdekvujup8zvtz2h0kknw.png)
Answer: the two numbers are 14 and 26.