Is it OK to splice NM and NM-B cable?
You can splice diferent sizes, temperatures or types (NM, UF, THHN, SJOOW) cable anywhere it's legal to splice cable. 


It needs to be inside a junction box.  
The boxes need to be someplaces boxes aren't disallowed. 
The cables need to have proper cable clamps entering the box. 
The boxes need to forever be accessible without disassembling any part of the building with any tool (aside from the box covers, obviously :)
There needs to be enough room in the box for the splices. 


"room in the box" works like this:  All ground wires count as 1 wire. All cable clamps count as 1 wire.  All other wires count as 1 wire each. Multiply your number of "wires" by 2.0 cubic inches for 14AWG.... 2.25 cubic inches for 12AWG.....  or 2.5 for 10AWG.  For you, 6 wires = 13.5 cubic inches = a deep handy-box will suffice, or my go-to, the 4x4x1-1/2 square box (21 cu.in.)  

I'm very fond of steel boxes because if there's any sort of arcing or shorting in there, the metal chassis will help assure a breaker trip and also dissipate the heat to keep things below combustion temperatures.   Also plastic boxes are stupid overpriced for what they are.