A right circular cylinder is inscribed in a right circular cone of altitude h and radius of base x, as shown in the figure. Find the radius of the cylinder if its lateral area is equal to the lateral area of the small cone which surmounts the cylinder.

This is my effort and i don't know if my effort is really an effort.

First i solved for the lateral area of the cone:

A= xhpi(sqrt of (x^2 + h^2))

Second i solved for the lateral area of the right cylinder:

A = 2pirh

And lastly i equated them and getting the result of the radius since the lateral area of the cone is equal to the lateral area of the right cylinder:

xhpi(sqrt of (x^2 + h^2)) = 2pirh

r = x(sqrt of (x^2 + h^2))/2

THE CORRECT ANSWER stated on the book is:

(2xh)/(2h+(sqrt of (x^2 + h^2)))

I want to know where in my solution is wrong..Thanks!