$$\textbf{Step-1: Find the number of balls in each bag.}$$
$$\text{Bag}$$ $$I$$ $$\text{ contains 3 white, 7 red and 15 black balls.}$$
$$\text{Bag}$$ $$II$$ $$\text{contains 10white, 6 red and 9 black balls.}$$
$$\therefore$$ $$\text{Each bag contains total of}$$ $$ 25$$ $$\text{balls.}$$
$$\textbf{Step-2: Find the number of cases for the selection of a ball.}$$
$$\text{There are three cases for selection of a particular ball:-}$$
$$\text{Case 1:}$$ $$\text{Probability of getting one white ball each from Bag}$$ $$I$$ $$\text{and Bag}$$ $$II=\dfrac{3}{25}\times\dfrac{10}{25}$$
$$\text{Case 2:}$$ $$\text{Probability of getting one red ball each from Bag}$$ $$I$$ $$\text{and Bag}$$ $$II=\dfrac{7}{25}\times\dfrac{6}{25}$$
$$\text{Case 3:}$$ $$\text{Probability of getting one black ball each from Bag}$$ $$I$$ $$\text{and Bag}$$ $$II=\dfrac{15}{25}\times\dfrac{9}{25}$$
$$\textbf{Step-3: Add the above cases to get the required probability.}$$
$$\therefore$$ $$\text{Total probability that both the ball will be of same colour}$$ $$=\dfrac{30} {625}+\dfrac{42}{625}+\dfrac{135}{25}=\dfrac{207}{625}.$$
$$\textbf{Hence, the answer is}$$ $$\boldsymbol{\dfrac{207}{625}}.$$