Given:
The equation of the ellipse is

The length of its major axis is 6.
To find:
The value of k.
Solution:
The standard form of an ellipse is

Where, a>b and 3a is the length of major axis.
We have,

Divide both sides by k.



Here,
.
So, the length of the major axis is




Therefore, the value of k is 18.