Jim had 92 more marbles than Sam. After Sam gave Jim 18 marbles, Jim had twice as many marbles as Sam. How many marbles did Jim have at first?

j+18 = 2(j-92-18)

Could you please check?

j+18 = 2(j-92-18)
j=128
Checking

128+18= 2*128-110
146= 36 ???? it does not make sense

To solve this problem, let's break it down step by step.

Step 1: Set up equations
Let's assume that Jim initially had 'x' marbles and Sam had 'y' marbles. Given the information in the problem, we can set up the following equations:

1) Jim had 92 more marbles than Sam:
x = y + 92

2) After Sam gave Jim 18 marbles, Jim had twice as many marbles as Sam:
x + 18 = 2 * (y - 18)

Step 2: Solve the equations
We have a system of two equations, and to find the value of 'x' (the number of marbles Jim had initially), we need to solve these equations simultaneously.

Substitute the value of 'x' from equation 1 into equation 2:
(y + 92) + 18 = 2 * (y - 18)

Simplify and solve for 'y':
y + 110 = 2y - 36
110 + 36 = 2y - y
146 = y

Step 3: Calculate the number of marbles Jim had at first
Substitute the obtained value of 'y' into equation 1 to find 'x':
x = y + 92
x = 146 + 92
x = 238

Therefore, Jim initially had 238 marbles.