The first equation is
x+y=158
Subtract y from both sides to get
x=158-y
The second equation is
x+25=3(y+25)
Substitute the first equation into the second
158-y+25=3(y+25)
183-y=3y+75
Add y to both sides
183=4y+75
Subtract 75 from both sides
108=4y
Divide by 4
y=27
Since x=158-y=158-27
x=131