I've been trying (and failing) to work this one out for some time.

You have a randomly-generated sequence of upper-case English letters of random length. Call this S1; call its length SL1.

You have a second randomly-generated sequence of upper-case English letters of random length. Call this S2; call its length SL2.

What is the probability that S2 can be found somewhere within S1? Obviously, if SL2 > SL1, the probability is zero...but what if it's not?

I started thinking that the possible places for S2 to start within S1 is given by SL1-SL2+1. And for each of the first (SL1-SL2+1) places in S1, there are 26 possible values. And that's kinda where I got stuck...