I don't think it's a particularly common problem, to be honest - I'm pretty sure there's nothing in the framework.
I suspect you'll need to work out whether you want efficiency or simplicity to implement your own. A fairly simple extension method version might look like this:
public static int IndexOf<T>(this IEnumerable<T> source,
T first,
T second)
{
IEqualityComparer<T> comparer = EqualityComparer<T>.Default;
// We can only return when we've read source[index+1], so we need
// to keep one value behind
int index=-1;
T prev = default(T);
foreach (T element in source)
{
if (comparer.Equals(first, prev) &&
comparer.Equals(second, element) &&
index >= 0) // Avoid edge cases where first=default(T)
{
return index;
}
index++;
prev = element;
}
return -1;
}