For simplicity, let's assume the major axis lies along the x-axis, where the foci are at (-c,0) and (c,0), and .
If the product of the distances from the point (-3,1) to the foci is 6, then we may state:
Now solve this for .
Next, the equation of the ellipse may be written:
Since the ellipse passes through (-3,1), we may write:
Using the value you found for , you may now solve for to find the equation of the ellipse.