If you are on 8i or later, you can use the returning clause. Assume the primary key column in the parent is named pk_col and the value for this column is assigned using a sequence in a trigger so we don't refer to pk_col in the insert statement. This is a PL/SQL example where v_pk_col is a variable that will hold the value of pk_col:
insert into parent (non_pk_col1, non_pk_col2) values ('some', 'data')
returning pk_col into v_pk_col;
insert into child (fk_reference_to_parent, non_pk_col3) values (v_pk_col, 'other');