# import necessary libraries
import pandas as pd
import numpy as np

# define two series
ser1 = pd.Series(['a', 'b', 'c', 'd', 'e'])
ser2 = pd.Series(['b', 'd', 'f', 'a', 'g'])

# find the index positions numpy functions
positions = np.nonzero(np.in1d(ser1, ser2))[0]

# print the result in the form of a dictionary
print(ser2[positions].to_dict())