Join mysql tables to find siblings and get their notifications
I am not sure I really get your purpose, but this is what would gives the answer you're looking for:

SELECT
    company.ID, company_notes.NotesID
FROM
    company 
    JOIN company_notes ON company_notes.ToId = company.parentID
WHERE
    company.parentID = 2 ;




If you use a DB that implements WITH, this would show it:

WITH company (ID, parentID, value) AS
(
VALUES 
    (1, 0, 22020),
    (2, 1, 23423),
    (3, 2, 22222),
    (4, 2, 23423)
),
company_notes(ID, FromID, ToID, NotesID) AS
(
VALUES
    (1, 1, 2, 33)
)

SELECT
    company.ID, company_notes.NotesID
FROM
    company 
    JOIN company_notes ON company_notes.ToId = company.parentID
WHERE
    company.parentID = 2 ;