Looks it can be implemented by a simple class `Pair`, for example:

```Java
    public <U, R> Observable<R> mergeMap(final Func1<? super T, ? extends Observable<? extends U>> collectionSelector,
                       final Func2<? super T, ? super U, ? extends R> resultSelector) {
        return flatMap(new Func1<T, Observable<Pair<T, U>>>() {
            @Override
            public Observable<Pair<T, U>> call(final T t) {
                return collectionSelector.call(t).map(new Func1<U, Pair<T, U>>() {

                    @Override
                    public Pair<T, U> call(U u) {
                        return new Pair<T, U>(t, u);
                    }
                });
            }
        }).map(new Func1<Pair<T, U>, R>() {
            @Override
            public R call(Pair<T, U> pair) {
                return resultSelector.call(pair._1, pair._2);
            }
        });
   }
    
    private static class Pair<T1, T2> {
        T1 _1;
        T2 _2;
        Pair(T1 _1, T2 _2) {
            this._1 = _1;
            this._2 = _2;
        }
    }
```