If ABCDABCD is divisible by 365, then it is divisible by 5, so it ends in either 5 or 0. Therefore, X=5 or 0.
Suppose X is either 5 or 0. Then, ABCX is divisible by 5. Also, ABCXABCX=10001ABCX. Let ABCX=5N. Then, ABCXABCX=10001(5N)=50005N=365(137N). Therefore, ABCXABCX is divisible by 365.