find the maximum are of rectangle if his points are O(0,0) A (x,0) C(0,y) and B is in the graph of function

i tried this way:

then i found the first derivative, then found the point witch the function has extremal (x=1) then i found the second derivative and plugged the extreme point x=1 into the function witch was now <0

now the maximum area is S=1*e^(-1)

am i right ? if it isn't how should i solve this ?