As far as I know, it's a proven good practice to bild indexes on the columns of a table that is the child member of a referential integrity constraint.
This prevents deadlock because without an index, Oracle has no single lower level resource to lock in order to prevent a concurrent insert that can violate the referential integrity.
I do also know that in case the index includes more columns then the ones on which the FK is built, the FK columns need to be the leading columns of the index.
I'm wondering what would happen in a circumstance when in case of a two column FK relation, there are two indexes on the child relation columns, where only one index has the FK columns in the leading position of a 4 column B-Tree index and the other has the FK columns in the first and fifth positions of 5 column B-Tree index.
No need to point out this indexing practice is quite bad, and re-ingeneering of indexing is needed, I will do.
Just for the sake of curiosity and to learn more on this topic, will the index with the FK column in the leading positions always be used for row locking in such situation?
I'm on Oracle 12c R1
Without going into detailed locking semantics the answer is yes. If you have an index with the FK columns in the right order in the leading positions it will be used. It doesn't matter if you have other indexes in place as well. In fact it is possible that both your indexes are OK, it depends on the application. Perhaps it uses them for important queries.