For the password to contain both X and Y:
$a = 26^8- 2 \cdot 25^8 + 24^8$
Would the answer to this question be $\frac{a}{2}$? Because all the strings with x appearing in front of y would be different from y in front of x, but they should be the same number of strings so we can just divide?
Am I doing this right/what am I missing?
That all letters are distinct invalidates your work and suggests that we
Thus there are $\binom{24}6\frac{8!}2$ passwords.