When you want to know the number of objects of some kind that contain at least one of something, it’s usually easiest to calculate the number that contain none and subtract that from the total number of objects. In your problem, for example, there are $26^3$ three-letter strings, of which $25^3$ contain no $x$’s, so there must be $26^3-25^3=1951$ three-letter strings containing at least one $x$. The same analysis can be applied to strings of any length: there are $26^k$ possible $k$-letter strings, of which $25^k$ contain no $x$’s, so there must be $26^k-25^k$ $k$-letter strings that contain at least one $x$.
It’s possible to count the number of strings of a given length that contain at least one $x$, but you have to consider multiple cases. Take strings of length three, for instance: a ‘good’ string can have one, two, or three $x$’s. There are $25^2\cdot 3$ that have one $x$, $25\cdot 3$ that have two $x$’s, and just one that has three $x$’s, for a total of $1875+75+1=1951$ ‘good’ three-letter strings. But you can see that this is going to be quite tedious for even moderately long strings.