A customer has to decide how many of products $x$ and $y$ to buy. The price of $x$ is $2x^{1/2}$ and the price of $y$ is $4y^{1/2}$. The cost of $x$ is 10 dollars and the cost of $y$ is 5 dollars. The customer wishes to spend a total of 90 dollars for both $x$ and $y$. How many units of $y$ should he buy?
I started with $10x + 5y = 90$ with $y=18 - 2x$ and differentiating got $\frac{1}{x^{1/2}} /4(18-2x)^{1/2} =10/5$, but am lost after that.
Your write-up seems to indicate that the consumer's utility function is purely additive in the two components, i.e., that it may be expressed as $$U(x,y)=2x^{0.5}+4y^{0.5}.$$
The marginal utility of consuming an additional unit of $x$ is $x^{-0.5}$, and the marginal utility of consuming an additional unit of $y$ is $2y^{-0.5}$. I.e., marginal utilities are always positive for non-zero quantities of $x$ and $y$, though declining in the amounts consumed. Note that with some slight abuse of notation, I'm letting "$x$" denote both the product itself and the quantity transacted.
Not stated explicitly in your posting but assumed as true, purchases must be non-negative, i.e., $x\ge 0$ and $y\ge 0$. (In mathematical finance, we'd call this a "no short selling condition"...)
Furthermore, we are told each unit of $x$ costs twice as much as a unit of $y$. Finally, to make this problem amenable to treatment by calculus, we'll assume that the goods are infinitely divisible.
Intuitively, because each unit of $y$ produces twice as much utility (at equal quantities) and costs only half as much as does a unit of $x$, we should expect the optimizing consumer to consume a lot more units of $y$ than of $x$. However, because marginal utility is declining in the quantity consumed, the optimizing consumer will still want to consume a nonzero amount of $x$. (Aside: Show that at $x=0$ the marginal utility of $x$ is infinite. Hence, $x=0$ cannot be optimal.)
How much of $x$ and $y$ should the consumer purchase? The consumer seeks to maximize the utility obtained from each extra dollar she spends. (This follows from the utility maximization principle that's been assumed.) Since she can buy 2 units of $y$ for the cost of a unit of $x$, a first order condition for optimal allocation of the marginal dollar spent is that the marginal utility received from an additional unit of $y$ should be half the marginal utility received from an additional unit of $x$. This assures that the marginal utility from spending one extra dollar on either $x$ or $y$ is equal. Why? Use some calculus... (OK, you'll also have to check the second order condition, to verify that utility is maximized rather than minimized at the point where the first order condition is met. Fortunately, this is really easy to do since the second derivatives of the utility function are positive everywhere for $x>0$ and $y>0$.)
For the utility function of this example, we must solve
$$\frac{1}{2}=\frac{dU/dx}{dU/dy}=\frac{1/x^{0.5}}{2/y^{0.5}}.$$
I.e., utility is maximized for $y/x=4^2=16$, i.e., along the line $y=16x$. This line intersects the budget constraint line $10x+5y=90$ at $$x^*=1\text{ and } y^*=16.$$