In DFA we can do the intersection of two automata by doing the cross product of the states of the two automata and accepting those states that are accepting in both the init
there is a huge mistake in the templatetypedef 's answer .
the product automaton of L1 and L2 which are NFAs :
new states Q = product of the states of L1 and L2 .
now the transition function :
a is a symbol in the union of both automatons alphabets
delta( (q_1,q_2) , a) = delta_L1(q_1 , a) X delta_L2(q_2 , a)
which means you should multiply the set that is the resualt of delta_L1(q_1 , a) with the set that results from delta_L2(q_1 , a).
the problem in the templatetypedef's answer is that the product result (qk ,rk) is not mentioned .