out of 5 places we choose any two for $a$.
then remaining 3 places filled in 26*26*26 ways..
So total words possible $=^5C_2 *26*26*26$
(I assume only lowercase 26 letters and repetition is allowed)
@Verma Ashish it will lead to overcounting.
Consider string aaaaa
If you do 5C2 (first and the last position is selected and a is placed) and rest have 26 options then aaaaa is counted. Similarly, if we select any other 2 places and keep a and rest any other element, your aaaaa string is counted many times.