This is extremely confusing. You ask about the energy required to destroy the sun but then say "Energy needed to destroy earth= x". So you want to find the energy required to destroy the sun as a multiple of the energy required to destroy the earth? Wouldn't that depend upon HOW you destroyed them?
Also you say "Gravity of earth= 1". There is NO quantity called "gravity". There is the force due to gravity which varies with the mass of the gravitating object and distance from it. The is also the "force of gravity on a 1 kg object at the surface of the earth" but that is so specific I can't imagine what it would have to do with this problem.
You say the mass of the sun is 330000 times earth's mass, and you can calculate, from the respextive circumferences, that the sun's volume is 160000 times the earth's volume. Now, I can imagine that the force required to "destroy" the sun would be proportional to the relative masses or to the relative volume's depending on exactly what you mean by "destroy" and how you were to do it.