I'm sure we knew this but when in pain it is tempting to hope for a small miracle. Always read the label and speak to a pharmacist.
It's usually glaringly obvious that the active ingredients in these products is exactly the same. And even if you don't understand that tension headaches, migraines and period pain are caused by different mechanisms (and noone's expecting you to know this!), it's not hard to imagine that an over the counter painkiller is just that - blocking pain wherever it's coming from.
Ibuprofen lysine is unlikely to help tension headaches, which are often caused by muscle tension and stress, or migraines as we still don't really understand the mechanism involved. Do make sure you speak to a pharmacist as I am not a prescriber but you could consider trying other over the counter drugs such as paracetemol for tension headaches and period pain. Seek advice first (especially if you have other health conditions) and do not exceed the dose stated.
Osteopathy can definitely help with tension headaches ( I can vouch for that myself)) and it may be able to help with the frequency and intensity of migraines and period pain.