
simulate this circuit – Schematic created using CircuitLab
In the above diagram what is the current through 10ohms resistor. Can we apply superposition principle.

simulate this circuit – Schematic created using CircuitLab
In the above diagram what is the current through 10ohms resistor. Can we apply superposition principle.
This is an invalid circuit.
If you put the two voltage sources in series, then that's OK.
If you want to keep the two sources in parallel like that, then at least one of them must be changed to a current source.
If you were to put this in to a simulator, it would refuse to play. A chatty simulator would tell you that you have a loop of zero impedance components. A grumpy simulator would probably just say 'degenerate matrix'.
You can use the superposition principle to see what's going on. It starts with 'replace all voltage sources but one with short circuits', and at once you can see the problem!
Don't forget this, as drawn, is an ideal circuit. If you use real components, say a 2v lead acid cell, a 5v 50A PC power supply, and 7/0.2 wire for hooking it up, there will be additional series resistance present, which is not shown on the schematic. Connection for a few mS would probably be OK, as the wire is heating up. Once the wire has reached plastic ignition temperature, or copper melting point, then things start to go pear-shaped fairly quickly.