We know that it cannot be correct to minimize the product $2x f(x)$
in order to minimize the area between the coordinate axes and the curve
$y = f(x)$ in the first quadrant, because the product $2x f(x)$ is zero when
$x=0$ and when $f(x) = 0$ and is positive everywhere else in the first quadrant.
Hence it has no minimum in the first quadrant except at those two points,
and we can easily show by example that the tangent enclosing the minimum area
is not always tangent to $y = f(x)$ where it intercepts a coordinate axis.
But let's see what method is correct.
Consider the curve $xy = k$ in the first quadrant.
The value at $x = a$ is $\frac ka$ and the slope is $-\frac k{a^2}.$
The tangent line therefore is $y - \frac ka = -\frac k{a^2}(x - a),$ which has $y$-intercept $\frac{2k}a$ and $x$-intercept $2a.$
The area bounded by this line and the two axes therefore is
$\frac12 \left(\frac{2k}a\right)(2a) = 2k,$
independent of the choice of tangent point $\left(a,\frac ka\right).$
Now consider a function $f$ on the interval $[0,x_0]$,
whose graph $y=f(x)$ connects the points $(0,y_0)$ and $(x_0,0)$,
and which is positive and has a decreasing derivative on the interval $(0,x_0).$
At any $x$ between $0$ and $x_0,$ if we take a line tangent to the graph of $f$
at $(x,f(x)),$ the graph of $f$ is below that tangent line at every other point.
The graph of $f$ between $(0,y_0)$ and $(x_0,0)$
intersects curves of the form $xy = k$ for many values of $k$;
let $m$ be the maximum such value of $k$.
Then the graph of $f$ will meet the graph of $xy = m$ at exactly one point,
$(x_m,f(x_m)),$
where the two graphs will be tangent to each other.
The area between the axes and the line tangent to the two graphs at that point
has area $2m.$
Now consider any other value of $x$ in the interval $[0,x_0]$
and take a line tangent to the graph of $f$ at $(x,f(x)).$
This tangent line passes above the point $(x_m,f(x_m)),$
so it also passes above the graph of $xy = m$ at that point.
This line is tangent to a graph of $xy = k$ for some $k > m$,
so the area between that line and the axes is greater than $2m.$
So the area under the tangent to the graph of $f$ is minimized at the point where the graph of $f$ is tangent to the graph of $xy = m$.
Moreover, $m$ is the maximum value of $xy$ at any point on the curve $y = f(x)$.
So the way to minimize the area between the axes and the tangent to the curve
$y = f(x)$ is to maximize (not minimize!) the product $xy = x f(x)$ for
$x$ between $0$ and $x_0.$
Naturally this also maximizes $2x f(x),$ and that maximum value also happens to be the minimum area between the axes and any tangent to the graph of $f.$
The reason it seems OK to try to minimize the product $2x f(x)$
is that the "obvious" way to minimize $2x f(x)$ in the first quadrant (if you forget how the minimum actually occurs) is to find the value of $x$ for which
$\frac{\mathrm d}{\mathrm dx} (2x f(x)) = 0,$
and this happens actually to be the value of $x$ that maximizes $2x f(x).$