For sake of discussion, let the digits be called ABCDE and VWXYZ. The two squares I'm thinking of can form, from those digits, another 5-digit square: ABXYZ. It is of the same type as the other two as AB is prime as is XYZ.

The use of different letters does not imply that all the letters represent different digits; any two may be the same or different, but the combined square does share its first two digits with those of one of the two original squares and its last three with the last three of the other.

What are the three squares?