J, 3434 32 bytes
[:(0=[<;.1~*)/[:*+/*.&#$&>,|/i:&(;2>#\)
Explanation
[:(<;.@*1~*)/[:+/*.&#$&>,:&(;2>#\)&#<; Input: array A (LHS), array B (RHS)
#\ Length of each prefix of A and B
2> Less than 2
; Link each with A and B
,:& Pair them
# Length of A and B
*.1[& LCM of the lengths
&> For each box
$ Reshape it to the LCM of the lengths
[:+/ Reduce by addition
[: / Reduce by
* Sign of RHS
<;.&#$&>;1~ Box each partition of LHS
Probably could be made less than 30 bytes.