Peter painted a total of 3 rooms. He spent 1/5 of his time on the first room and 1/3 of the remaining time on the second room. He spent 8 hours painting the last room. How much time did he take to complete painting all 3 rooms?

Let T be the total time he spent painting all 3 rooms.

He spent T/5 painting the first room.
He had T - T/5 = 4T/5 remaining.
He spent (4T/5) * 1/3 = 4T/15 painting the second room.
He spent T/5 + 4T/15 = 3T/15 + 4T/15 = 7T/15 painting the first and second rooms.
Thus, he took T - 7T/15 = 8 hours painting the last room.
Therefore, T = 8 / (8/15) = 8 * (15/8) = <<8/(8/15)=15>>15 hours. Answer: \boxed{15}.

Let's break down the information given step by step:

1. Peter spent 1/5 of his time on the first room.
2. This means he spent 4/5 (= 1 - 1/5) of his time on the remaining rooms.
3. He then spent 1/3 of this remaining time on the second room.
4. Therefore, he spent 1/3 * 4/5 = 4/15 of his total time on the second room.
5. We know that he spent 8 hours painting the last room.
6. This means that the remaining time he spent on the first and second rooms is equal to the total time minus 8 hours.
7. Let's represent the total time as T.

Now, let's create an equation to solve for T:

1/5T + 4/15T = T - 8

To simplify the equation, let's find the common denominator:

3/15T + 4/15T = T - 8

Combining the terms on the left side:

7/15T = T - 8

To get rid of the fraction, we can multiply both sides of the equation by 15:

7T = 15T - 120

Let's move the terms involving T to one side of the equation:

15T - 7T = 120

Combine like terms:

8T = 120

Now, let's solve for T by dividing both sides by 8:

T = 120 / 8

T = 15

Therefore, Peter took a total of 15 hours to complete painting all 3 rooms.

To find out how much time Peter took to paint all 3 rooms, we need to calculate the time he spent on each room and then add them up.

Step 1: Calculate the time Peter spent on the first room.
Peter spent 1/5 of his total time on the first room.
Let's represent the total time as "x."
So, the time spent on the first room = (1/5) * x.

Step 2: Calculate the remaining time Peter had after painting the first room.
The remaining time can be calculated by subtracting the time spent on the first room from the total time.
Remaining time = x - (1/5) * x.

Step 3: Calculate the time Peter spent on the second room.
Peter spent 1/3 of the remaining time on the second room.
Time spent on the second room = (1/3) * (x - (1/5) * x).

Step 4: Calculate the time Peter spent on the last room.
Peter spent 8 hours on the last room.

Step 5: Set up the equation to find the total time.
The total time Peter spent on all 3 rooms is the sum of the time spent on each room.
(x - (1/5) * x) + (1/3) * (x - (1/5) * x) + 8 = x.

Step 6: Solve the equation.
Combine like terms and solve for x.
Multiplying the remaining time by (1 - 1/5), we get (4/5) * x.
Similarly, multiplying the remaining time by (1 - 1/3), we get (2/3) * (4/5) * x.
The equation becomes:
(4/5) * x + (2/3) * (4/5) * x + 8 = x.

Multiplying the remaining time by (2/3) * (4/5), we simplify to (8/15) * x.
The equation becomes:
(4/5) * x + (8/15) * x + 8 = x.

To eliminate the denominators, multiply the entire equation by the least common multiple (LCM) of 5, 3, and 15, which is 15.
15 * [(4/5) * x + (8/15) * x + 8] = 15 * x.

Simplifying the equation:
12x + 8x + 120 = 15x.

Combining like terms:
20x + 120 = 15x.

Moving all the terms to one side, we get:
20x - 15x = -120.

Simplifying, we find:
5x = -120.

Divide both sides by 5:
x = -120/5.

The total time Peter took to complete painting all 3 rooms is x hours.
Substituting the value of x into the equation, we get:
x = -24.

However, we can disregard the negative value as time cannot be negative in this context.

Therefore, Peter took 24 hours to complete painting all 3 rooms.