1.For your tangent line compute

y= f ' (a)(x-a) +f(a)

yes it will contain both x and a

2. find the x intercept by letting y= 0 and solve for x

compute the distance from the xintercept to the point (4,0) this is the base of your triangle

3. A = 1/2 bh the base you have --the height is f(a)

So A will be a function of a

4. Maximize the area using the derivative

It will get messy ---I get a = .745

If anyone knows of a more clever way I'd like to know.