I'm in the process of learning Assembly language using NASM, and have run into a programming problem that I can't seem to figure out. The goal of the program is to solve this equation:
[Picture of Equation](https://i.stack.imgur.com/8BdGd.png)
For those unable to see the photo, the equation says that for two arrays of length n, array a and array b, find: for i=0 to n-1, ((ai + 3) - (bi - 4))

I'm only supposed to use three general registers, and I've figured out a code sample I think could possibly work, but I keep running into comma and operand errors with lines 16 and 19. I understand that in order to iterate through the array you need to move a pointer to each index, but since both arrays are of different values (array 1 is dw and array 2 is db) I am unsure how to account for that. I'm still very new to Assembly, and any help or pointers would be appreciated.
Here is a picture of my current code:
[Code Sample](https://i.stack.imgur.com/zqxp0.png)

```
       segment .data
  a         dw    12, 14, 16      ; array of three values        
  b         db    2, 4, 5         ; array of three values
  n         dw    3               ; length of both arrays
  result    dq    0               ; memory to result
      segment .text
      global main
  main:
      mov   rax, 0
      mov   rbx, 0
      mov   rdx, 0
  loop_start:
      cmp   rax, [n]
      jge   loop_end

      add   rbx, a[rax*4]   ; adding element of a at current index to rbx
      add   rbx, 3          ; adding 3 to current index value of array a in rbx

      add   rdx, BYTE b[rax]
      sub   rdx, 4

      sub   rbx, [rdx]
      add   [result], rbx

      xor   rbx, rbx
      xor   rdx, rdx
      add   rax, 1
  loop_end:
      ret 

```