Bunuel's approach is the best approach (as usual). If you do not know or understand the Binomial Theorem or Fermat's Little Theorem or Wilson's Theorem (or any other theorem for that matter), there is a bit longer way to proceed.
Concept: Given --- X * Y / 7 ---- and you want to know the Remainder, you can take the Rem of the terms separately and then Multiply the Remainders. In the end you remove the Excess Rem greater than 7 by continually dividing 7 (the Divisor) from the Excess Rem
Step 1: Nested Exponent Rule
(18 ^ 22) ^ 10 = 18^22 * 18^22 * 18^22 ........ * 18^22 ----- 10 Times Multiplied
When you Add the Powers of the Same Base 18, the Result = (18)^220
Step 2: 18 = 2 * 3^2 ----- Substitute this Prime Fact. in for 18
(2 * 3^2) ^ 220
Again applying the Nested Exponent Rule
(2) ^220 * (3) ^ 440
Divide all of this by 7
[ (2)^220 * (3)^440 ] / 7 --- Rem = ?
Using the 1st Concept of Splitting the Terms and Multiplying the Remainders:
( [ 2^220 / 7 ] Remainder of ) * ( [ 3 ^440 / 7 ] Remainder of ) = Remainder of above
Step 3: Find the Cyclicity of the Remainder Pattern when you continually Divide Consecutive Powers of 2 by 7 and Consecutive Powers of 3 by 7
2/7 ------- Rem = 2
4/7 ------ Rem = 4
8/7 ------- Rem = 1 *you can stop here, after a Rem = 1, the Pattern will keep repeating
Remainder pattern when 2^x is Divided by 7 ----- [2 - 4 - 1] --- 3 Remainders keep repeating over and over
Dividing the Exponent (220) by 3 --- 220/3 = Rem of 1
****Thus the Remainder when 2^220 / 7 = Rem of 2
When you do the Same for 3^x / 7, you find the Remainder Pattern ---- [3 - 2 - 6 - 4 - 5 - 1]
Dividing the Exponent of 440 by the 6 Cyclicity of the Rem Pattern ---- 440/6 = Rem of 2
***Thus the Remainder of: (3)^440 / 7 --- Rem = 2
(2^220 / 7) Rem of 2 * (3^440 / 7) Rem of 2 = Total Remainder of 4
Since this Remainder of 4 is Less Than the Divisor this is your Answer.
Really long way to do it, Bunuel's approach in the beginning is much faster. Understanding the Binomial Theorem is helpful. For this approach, knowing the Powers of 2 and Powers of 3 (thanks Karishma for advising that) really helps it move along faster.