Raju had some stamps. He gave 3/7 of them to Nick and 5/12 of the remainder to Owen. After Raju bought another 126 stamps, he had as many stamps as he had at first.

(a) What fraction of his stamps did Raju give away?
(b) How many stamps did Raju have at first?

Let's work backwards from the end of the problem to figure out Raju's initial stamp count.

After Raju bought another 126 stamps, he had as many stamps as he had at first. This means that the number of stamps he had initially plus 126 is equal to the number of stamps he had after giving away some to Nick and Owen.

Let's call the initial stamp count "x". After giving away 3/7 of them to Nick, Raju has 4/7 of his stamps remaining. That means he gave away 3/7 of his stamps, or (3/7)x stamps.

So after giving away 3/7 of his stamps, he has (4/7)x stamps remaining. After giving 5/12 of that remainder to Owen, he has (7/12)(4/7)x stamps remaining.

So the equation we can set up is:

x + 126 = (7/12)(4/7)(5/12)(x - (3/7)x)

Simplifying:

x + 126 = (5/18)x

x = 630

So Raju had 630 stamps initially.

To find the fraction of stamps he gave away:

Fraction given away = (3/7)x / x = 3/7

So Raju gave away 3/7 of his stamps.

To solve this problem, let's assume Raju initially had "x" stamps.

(a) Fraction of stamps Raju gave away:
Raju gave away 3/7 of his stamps to Nick.
So, the fraction of stamps Raju gave away is 3/7.

(b) Number of stamps Raju had at first:
After giving away 3/7 of his stamps to Nick, Raju had (1 - 3/7) of his stamps remaining.
That is, Raju had 4/7 of his stamps remaining.

Then, Raju gave away 5/12 of the remaining stamps to Owen.
So, the fraction of stamps Raju had after giving some to Owen is (1 - 5/12) of (4/7).

After giving away some stamps, Raju had the same number of stamps as he had initially when he bought another 126 stamps.
Let's calculate the equation:
(1 - 5/12) * (4/7) * x + 126 = x

Now, let's solve the equation to find the value of x:
(7/12) * (4/7) * x + 126 = x
(2/3) * x + 126 = x
x - (2/3) * x = 126
(1/3) * x = 126
x = 378

Therefore, Raju initially had 378 stamps.