Your actual answer will depend on what database system you are working on. However, generically, the indexes may help depending on the sophistication of the query optimizer.
Both queries are technically identical. One uses the old SQL format (SQL-89?) for joins, while the other uses the explicit JOIN statement from SQL-92. However, the second form may give you better performance because of optimizer differences.
Additionally, it is more readable, and for certain complex queries, the old form LEFT and RIGHT JOIN equivalents can result in incorrect outputs. Since they are also disallowed in some database engines (including later versions of SQL Server), using the SQL-92 formats consistently, instead of having inner joins use the old form join and LEFT, RIGHT (and if implemented, CROSS and FULL OUTER) JOINs use the explicit form is potentially confusing. Using the explicit join syntax from SQL-92 is highly recommended.
The indexing needed for JOINing the two tables is suboptimal. The most efficient style of index for you would have an index on both
col_x on both tables, since both fields are used in the table JOIN. This, however, can vary by the actual data stored in both tables.
For example, if
table_b only contains a few dozen records (plus or minus, depending on record size, actual database system used, speed of disk and memory, etc.), then the system may choose to scan the table for matches no matter what indexes are created, simply because the table scan on such a small table is more efficient than looking rows up in the index, then finding the row on disk to read it. But, generically, the indexing I talked about above is the most efficient.
So now you see some of why indexing in databases is a bit of an art, even though the logic of it is straightforward. There are still other considerations in the real world. Welcome to the world of DBA experience!