Let each literature text book cost be Rs. X
Then, cost of mathematics text book = Rs. (X + 2)
ATQ,
5X = 38 + 3(X + 2)
5X = 38 + 3X + 6
2X = 44
X = 22.
Therefore, cost of each literature text book = Rs. X = Rs. 22.
And that of masthematics = X + 2 = Rs. 24.