Attacking stats and moves’ BP are two completely different things in damage calculation.
Damage calculation is a complicated and intricate process, with many factors including offensive stats, STAB, BP, abilities, terrain, weather, opponents’ defensive stats, and more.
For example, here’s a picture of the Gen 5-9 damage calculation:
As you can see, STAB is a multiplier after the parentheses, meaning that STAB is applied after level, BP, level, and attack/defense stats. Using PEMDAS, we notice that attack/defense stats and BP are multiplied with each other in the parentheses. In your first example with Steelix, you solve the first set of parentheses, which in a normal case would be 42. You multiply 42 by EQ's BP of 100, getting 4200. Then, you multiply 4200 by Steelix's Atk stat divided by the opponent's Def stat, which let's say is 200. 4200 x 200/200 is 4200. You then divide 4200 by 50 to get 84, and add 2 to get 86. From there, you multiply the rest of the modifiers, such as weather, ra 129ndom, and STAB. Let's say that there is no terrain, weather, or other modifier applicable other than STAB and random. STAB is a 1.5x modifier, so 86 x 1.5 is 129. From 129, the game randomly chooses an integer from 85 to 100, and divides that integer by 100. You multiply that product by 129, and that last number, rounded down, and that would be how many HP is lost on the opponent's side. Here's a damage calc result to prove my own calculation:
- 68- Atk Steelix Earthquake vs. 0 HP / 176 Def Absol: 109-129 (40.2 - 47.6%) -- guaranteed 3HKO
Possible damage amounts: (109, 109, 111, 112, 114, 115, 117, 118, 118, 120, 121, 123, 124, 126, 127, 129)
Now, to properly answer your question:
STAB applies its 1.5x modifier after a parenthetical expression that contains the variables of level, Atk/Def, and BP. STAB applies at the same times as other modifiers such as weather, terrain, type effectiveness, etc. This means that a Steelix with a 200 Atk stat with 100 EQ + STAB does not deal the same amount of damage as another Pokémon with 300 Atk and EQ + no STAB, even without other modifiers.
Hope I helped!