Java, 179181
I hope that according to
You are permitted to write a full program or a function.
it is compliant to the rules to count the bytes of the function, which is 179in181 in this case
import static java.lang.System.*;
public class Boxes
{
public static void main(String[] args)
{
Boxes b=new Boxes();
System.out.println("1,1:");
b.b(1,1);
System.out.println("1,2:");
b.b(1,2);
System.out.println("2,1:");
b.b(2,1);
System.out.println("2,2:");
b.b(2,2);
System.out.println("2,5:");
b.b(2,5);
}
void b(int R, int C){String s="",e=s,x,y,z=s,a="==="a="====",n="=\n";int r,c;for(r=R;r-->0;){x=y=e;for(c=C;c-->0;){x+=a;y+="= ";}s+=x+n+y+n;}for(c=C;c-->0;){z+=a;}s+=z+n;out.println(s);}
}