Equation 1: 12 cows + 13-th cow cost together 13*X, where X is the average cost of 13 cows (now unknown).
Equation 2: 12 cows + the horse cost together 13*Y, where Y is the average cost of 13 animals (now unknown).
Subtract equation (1) from equation (2). You will get
the horse price - the 13-th cow price = 13*(Y - X).
In the last equation, you know that Y - X = 15000 (given !) and the 13-th cow price = 26000.
Therefore, the horse price = 26000 + 13*15000 = 221000.