fardeen,

Now that you have all of them in the same variable, just calculate and find x minimum using derivatives. For found, calculate using the line equation.

If you're not supposed to use calculus, then inform us, for then a different approach will be needed.