If a 4-digit number is formed by using the digits 1,2,3,4,5 (repitition is allowed )
Thousands, Hundreds and Tens place can be filled up with 5 ways each.
So, a total of 5×5×5 ways to fill these three place.
Now, if the given numbers 1,2,3,4,5 are filled in the unit place, they will form 5 consecutive numbers, out of which only one is divisible by 6.
So, total 4-digit numbers divisible by 6 are 5×5×5×1=125