В FirstActivity:
static public final String A = "a";
static public final String B = "b";
int a = ...
int b = ...
final Intent i = new Intent(this, SecondActivity.class);
i.putExtra(A, a);
i.putExtra(B, b);
this.startActivity(i);
В методе onCreate () SecondActivity:
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
final Intent startingIntent = this.getIntent();
final Bundle extras = startingIntent.getExtras();
a = extras.getInt(FirstActivity.A);
b = extras.getInt(FirstActivity.B);
...
}