EDIT: now, that actual code has been posted I will add some too:
a)
subi $5, $0, 20 # f = a - 20
add $5, $5, $1 # f = f - b
add $5, $5, $2 # f = f + c
sub $5, $5, $3 # f = f - d
b)
sll $at, $8, 2 # at = j << 2;
add $at, $at, $9 # at = at + baseA; (add base adress of array)
lw $tmp, ($at) # tmp = A[at];
sll $tmp, $tmp, 6 # tmp = tmp << 6;
sll $at, $7, 2 # at = i << 2;
add $at, $at, $10 # at = at + baseD; (add base adress of array)
sw $tmp, ($at) # D[at] = tmp;
c)
lw $at, 20($10) # at = D[5]; (5 * 4 bytes = 20, base address for D: $10)
sll $at, $at, 2 # at = at << 2;
add $at, $at, $9 # at = at + baseA; (add base adress of array)
lw $at, ($at) # at = A[at];
sub $5, $6, $at # f = g - at;