Prior - implies 2 events are involved, in which case, it is always " x prior to y ".
I spoke to your sales staff yesterday prior to the meeting with you at 2 pm that the shipment must make the 5 pm deadline.
So for # 1, "These can be avoided with careful planning prior to the day of delivery." is correct.
For # 2 to be correct, "These can be avoided with careful planning [before] prior the day of delivery." prior" should be changed to "before".