There are two images. Both images have the same objects but with a different relationship between them. 
Sentences A and B describe the two images and sentences 1 and 2 describe the same images.
Match sentences A and B to 1 and 2. Creating two pairs. Each pair need to describe the same image.

A) the image shows a computer on top of books 
B) the image shows books on top of a computer

1) a stack of books and a laptop on top of them
2)  a stack of books on top of a laptop

solve it step by step:
Step 1: Identify the common objects in both sets of sentences. Define objects: Obj1, Obj2.
Step 2: Identify the common relation in both sets of sentences. Define relation: RelationA.
Step 3: Rewrite the first set of sentences with the same relation and the same objects. Obj-Relation-Obj
Step 4: Rewrite the second set of sentences with the same relation and the same objects. Obj-Relation-Obj
Step 5: Match the sentences that describe the same relation between the common objects