Let us review the definition of a transitive closure. For a given relation R, the transitive closure R' is the smallest transitive relation that includes R.
This means that relation R' has all the pairs that the transitive property requires on elements of R. Furthermore, the relation R', must be transitive itself. So it will have all the pairs that the transitive property requires on its newly added pairs.
So for relation R = {(1,2), (2,3), (3,1), (4,1)} on set A = {1, 2, 3, 4}, the transitive closure R' must include (1,3) because of the transitive property on (1,2) and (2,3). Similarly, It must also include (2,1), (3,2), and (4,2).
So far R' = {(1,2), (2,3), (3,1), (4,1), (1,3), (2,1), (3,2), (4,2)}. But is R' transitive yet? No, because now (1,2) and (2,1) are in R', but (1,1) is not. So we need to add all other pairs that makes R' a transitive relation, and we stop once we reach a transitive relation. This recipe leads to the following.
R' = {(1,2), (2,3), (3,1), (4,1),
(1,3), (2,1), (3,2), (4,2),
(1,1), (2,2), (3,3), (4,3)}
which is the final answer.
Intuitively, if we think of relation R on set A as a directed graph that specifies one-way connections between elements of A, then the transitive closure R' explicitly specifies the one-way reachablities implied by R.