Utility function is given as $U = \sqrt{XY}$ find Matthew has a utility function $U = \sqrt{XY}$ where X represents hot dogs and Y represents apples. He has an income of $20. 

Hot dogs cost \$1.00 and apples cost \$1.25

Part (i) asks: Matthew's utility fucntion implies that the marginal utility of apples is $0.5 \sqrt{\frac{X}{Y}}$ and the marginal utility of hotdogs is $0.5 \sqrt{\frac{Y}{X}}$. How many apples will he buy? How many hot dogs will he buy?

Part (ii) asks: This year, the price of hot dogs rise to \$3 each while Mathew’s income is unchanged. Mathew’s father decides to help him by giving him a gift of \$20. Consider an indifference curve-budget line diagram with hot dogs on the x-axis and apples on the y-axis. After Mathew gets the \$20 gift, will his new budget line lie above, lie below, or pass through his initial optimum? Justify your choice. Will Mathew be better or worse off than he was last year?

What have I done?

I'm pretty stuck on this. There aren't really any similar examples from me to draw upon from our course literature. 

Perhaps the formulas $\dfrac{MU_x}{MU_y} = \dfrac{P_x}{P_y}$ and $I = P_x \cdot x + P_y \cdot y$ might help.
Rather than write a complete answer, I am going to post a couple of hints that will hopefully get you underway.



For part (i), note that


You have two equations: $\dfrac{MU_x}{MU_y} = \dfrac{P_x}{P_y}$ and $I = P_x \cdot x + P_y \cdot y$.
Since we know $MU_x$, $MU_y$, $P_x$, $P_y$, and $I$, these two equations contain two unknowns.
Usually, so long as we have at least as many equations as there are unknown variables, we can find the value of those variables by simultaneously solving the equations.
the $x$ in $I = P_x \cdot x + P_y \cdot y$ is the quantity of hot dogs that you are asked to compute in part (i), so ultimately you are going to have to solve for the value of this variable.
my suggestion would therefore be that you try substituting into your two equations all of the things whose value you know and then try solving for $x$.




Since a budget line is a straight line, it is characterised by an intercept, $c$, and a slope, $m$.

If you think about drawing this line geometrically then you should recognise that


the intercept is the amount of $y$ you could afford if you didn't buy any $x$ and spent all of your available money on $y$.
the slope is the number of units of $y$ you would have to give up to save enough money to afford one more unit of $x$.


Once you know the slope and the intercept, you can write down the equation for your budget line, $y=mx+c$, and answering part (ii) is then just a matter of algebra.