DEEPESH MANI :
okay. but why price differ between them bcz of the longer duration or brand make the ram faster than other
Price will mainly be based on speed and timings, faster ram will generally be more expensive. But you have to consider timings as well, for example a 3000mhz CL14 kit would likely be more expensive than a 3200mhz CL16 kit. Also aesthetics, if you want ram covered in RGB LEDs or some kind of fancy heatsink you will pay for it.
If you find some G skill ram with the same speed and timings as some PNY ram and one is more expensive than the other, I do not think its worth paying a premium for a specific brand as long as its reputable like both PNY and g skill are.