(i) Let n(A)=p and n(B)=q. A relation from A to B is any subset of A×B, so there are 2pq of them. Hence pq=15. Since A and B are disjoint, n(A∪B)=p+q, and the number of relations on A∪B is 2(p+q)2. Hence (p+q)2=64, so p+q=8.
p and q are the roots of t2−8t+15=0, that is, 3 and 5. So {n(A),n(B)}={3,5}, but these facts alone cannot tell which set has 3 elements.
(ii) There are 2q2 relations on B, so q2=25 and n(B)=5; then n(A)=3. Now n(A×(A∪B))=3×8=24, so the number of relations from A to A∪B is 224.