Algebra arrays

a) Fill in the squares in the box below so that
  •   the numbers across each row sum to the total at the end of the row, and
•   the numbers down each column also sum to the total at the bottom of the column.
   
Only the numbers 1 to 7 can be used. A number can be used more than once.
  

Total   


b)
 
Fill in the squares in the box below so that
  •   each row adds to 3x + 3y, and
•   each column also adds to 3x + 3y.
         Total
  
  
  
Total