Slope of budget line= change in y/ change in x and also Marginal rate of substitution= change in y/ change in x. If the definitions are same of both then what is the difference between the two? I mean 1. Slope of the budget line will be number of units of good y that the consumer is willing to sacrifice for an additional unit of good x. 2. The marginal rate of substitution (MRS) is the amount of a good that a consumer is willing to give up for another good. Here both definitions means the same, right?
Not really, you're right in that (loosely speaking) the MRS is the amount of one good someone is willing to give up in order to get an additional unit of another good. However, the slope of the budget line measures the amount of one good someone has to give up in order to get an additional unit of another good.
In the first case, only preferences matter, whereas in the second only prices are relevant.