Oh, I see -
You're talking about adding/moving the electrical box on the on the left
side of your picture - to line up with the box on the right?
Cut a hole through the 2 X 10; so you can install another box?
I think that's what you're saying.
If you're going to install a "GFCI" in the box that you're going to add -
should be a 4" by 4" by 1 1/2" - not a switch-box.
It looks like you can do that -
Remember - if you have to extend the wiring - splices should only occur in boxes with access - cover-plates on boxes closed off.
Don't worry about "Double-posting" - just a reminder.
rossfingal