Jim had 4/5 as many stamps as Kenny. After Jim bought another 52 stamps and Kenny gave away 78 stamps to his brother, Kenny had 1/3 as many stamps as Jim. How many stamps did both of them have altogether at first?

J = 4/5 K

J+ 52 = 3 (K-78)
4 K/5 = 3 K -234 -52
4 K = 5 (3 K - 286) = 15 K - 1430
11 K = 1430
K = 130
J = 4/5 * 130 = 104
add them 234

Let's go through the problem step by step:

1. Let's assume that the number of stamps Jim had initially is J and the number of stamps Kenny had initially is K.

2. According to the given information, Jim had 4/5 as many stamps as Kenny, so we can write an equation: J = (4/5)K.

3. After Jim bought another 52 stamps, his total number of stamps became J + 52.

4. Kenny gave away 78 stamps to his brother, so his total number of stamps became K - 78.

5. According to the given information, Kenny had 1/3 as many stamps as Jim after these transactions, so we can write another equation: K - 78 = (1/3)(J + 52).

Now, we can solve these two equations to find the values of J and K:

Step 1: Substitute the value of J from equation 2 into equation 5:

K - 78 = (1/3)((4/5)K + 52).

Step 2: Multiply both sides of the equation by 15 to remove the fractions:

15(K - 78) = 5(4K + 260).

Step 3: Simplify the equation:

15K - 1170 = 20K + 1300.

Step 4: Move the variables to one side:

15K - 20K = 1300 + 1170.

-5K = 2470.

Step 5: Divide both sides by -5:

K = -494.

Since the number of stamps can't be negative, this value of K is not valid.

Hence, there is no valid solution to this problem.

To solve this problem, we need to break it down into smaller steps.

Step 1: Determine the initial number of stamps Jim had.
Let's assume Jim had x stamps.

Step 2: Determine the initial number of stamps Kenny had.
Since Jim had 4/5 as many stamps as Kenny, we can set up the equation:
x = (4/5) * Kenny's initial number of stamps

Step 3: Determine the number of stamps Jim had after buying 52 more.
Jim now has x + 52 stamps.

Step 4: Determine the number of stamps Kenny had after giving away 78 stamps.
Since Kenny now has 1/3 as many stamps as Jim, we can set up the equation:
(1/3) * (x + 52) = Kenny's initial number of stamps - 78

Step 5: Solve the equations simultaneously.
Substitute x = (4/5) * Kenny's initial number of stamps into equation 4:
(1/3) * ((4/5) * Kenny's initial number of stamps + 52) = Kenny's initial number of stamps - 78

Step 6: Simplify and solve for Kenny's initial number of stamps.
Simplify equation 5:
(4/15) * Kenny's initial number of stamps + 52/3 = Kenny's initial number of stamps - 78
Multiply through by 15 to remove fractions:
4 * Kenny's initial number of stamps + (52 * 5)/3 = 15 * Kenny's initial number of stamps - 15 * 78
20 * Kenny's initial number of stamps + 260 = 15 * Kenny's initial number of stamps - 15 * 78
20 * Kenny's initial number of stamps - 15 * Kenny's initial number of stamps = -260 - 15 * 78
5 * Kenny's initial number of stamps = -260 - 15 * 78
5 * Kenny's initial number of stamps = -260 - 1170
5 * Kenny's initial number of stamps = -1430
Kenny's initial number of stamps = -1430 / 5
Kenny's initial number of stamps = -286

Step 7: Interpret the result.
Since you can't have a negative number of stamps, the equation leads to an invalid solution.

Conclusion:
Based on the given information, it seems there is no valid solution or inconsistency. Please double-check the problem statement or provide additional information to proceed with solving the problem.