It can help to write each number in expanded form, where the digit is multiplied by a power of the base.
332 base 5 = 3*5^2 + 3*5^1 +2*5^0 = 75 +15 +2 = 92
In base 8, this is
92 = 64 + 24 + 4 = 1*8^2 + 3*8^1 + 4*8^0 = 134 base 8
_____
The conversion of an integer to base b is often done by finding the remainder when dividing by b.
92/8 = 11 remainder 4
11/8 = 1 remainder 3
1/8 = 0 remainder 1
The digits of the converted number (right to left) are the remainders at each step. Here: 92 = 134 (base 8).