The way the solution is written, they set x as both the cost and selling price of the taco, and y as both the cost and selling price of the burrito.
30x = 25y
y = 6/5 * x
Then they say the profit on one taco is 6/5*x - x = 1/5*x
And the profit % is
((1/5*x)/x) * 100 = 20%
That doesn't seem correct.
Suggest letting a taco be the same thing as a burrito.
Then say C = cost price of 1 taco
and S = selling price of 1 taco. (= Cost price + P ( the profit on one taco) )
So 30*C = 25*S = 25*( C + P)
30*C = 25*C + 25*P
5*C = 25*P
C = 5*P.
So the cost of one taco = 5 times the profit.
Since the cost of one taco is obviously 100% of the cost of one taco, this means that the profit on one taco must be one-fifth of this, ie. 20%.
Does that make sense?
It seems to be that the question you were given was badly phrased...