Consider just the family photos. If there are $n$ family photos, how many ways are there to arrange those photos in the first frame? If there are $m$ vacation photos, how many ways are there to arrange those in the second frame? (To answer each of these questions, the formula in your question will be handy). Finally, how can you compute the total number of ways from the two answers above?