Wiring a double oven on a wall opposing the wiring?
No this is not safe nor to code. Extension cords cannot be concealed. A new circuit should be run to the new location and the old circuit decommissioned and/or removed.  Depending on if the oven is hardwired or corded will dictate how it should be terminated (either a plug or an electrical box).

It sounds like you are unfamiliar with this, so the "best" way is to contact a licensed electrician to completely this.