Substitute that value for 'y' into the profit function. This will give you an equation in a single variable and your differential calculus should find the maximum easily.
Or, the geometry of the situation should do it without calculus.
On the third hand, are you SURE you have the problem correctly reported? If so, your solution may be an endpoint that doesn't make much practical sense.