Some relational query language/algebra relations have ordered column names. So an attribute name can name more than one column. (There should be a way to reference a column by column number.) The Cartesian product operator can take any two relations, because it is not a problem for an attribute name to appear more than once on output (or input).
Some relational query language/algebra Cartesian product operators change attribute names on output. Input relations have associated names. (The input either includes names of relation variables/constants or relation values contain names.) Each output column name is a combination of an input column name and an input relation name. The Cartesian product operator can take any two relations. Because columns that appear in different relations with the same attribute name on input will be distinguished by input relation name on output.
Some relational query languages/algebras have both. The Cartesian product operator can take any two relations.
Some relational query language/algebra relations have only one copy of an attribute name. So Cartesian product can only be called when inputs don't share any attribute names. (It is just a special case of NATURAL JOIN and/or EQUIJOIN.) If you have inputs sharing column names and you want output with a column for every input column then you need to rename columns so all are different before you join.
So you must pay close attention to what kind of relations and operators a relational query language/algebra has.
PS: SQL query language
The FROM clause of a SELECT expression makes a temporary Cartesian product of its tables. Every column name is an input column name prefixed by a given table name or table alias, plus a dot. This is the changes-names verions of Cartesian product above. The dotted names are used in the rest of the SELECT expression. The SELECT clause finally removes the prefixes and dots. So there are no dots in an SQL table value outside a SELECT expression. (The columns are also ordered, and there can be duplicate column names.)
If your SQL table expressions are AB & BD then you just need
SELECT * FROM AB ab CROSS JOIN BD bd