I'm not sure what you're trying to achieve but...
You allocate new objects without using them:
Panel p = new Panel()
var newpanel = new Panel();
var newpanel2 = new Panel()
Drag and drop should be initialized by the containing object.
In this case (I think) it is the window?
this p.DoDragDrop(p, DragDropEffects.Link);
You should look for a specific data in the drop event handler, otherwise it is an unsafe practice.
if(e.Data.GetDataPresent(typeof(Panel)))
newpanel = (Panel)e.Data.GetData(e.Data.GetFormats()[0] typeof(Panel));
Try to firstly remove the panel from it's previous container and then add it to the new one.