Inner Join until null on self-referencing tables
There is a chapter in SQL Server called: Recursive Queries Using Common Table Expressions. It is very well explained and has a very clear and simple example.

https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms186243(v=sql.105)

Based on this documentation, my query solution is as follows (tested OK):

WITH CTE_RecursiveOU (ID, ParentID, DepCode,DivCode)
AS
(
-- Anchor member definition
    SELECT 
        u.ID as ID,
        u.ParentOrganizationalUnit as ParentID, 
        u.Department_Code as  DepCode,
        u.Division_Code as DivCode
    FROM dbo.OrganizationalUnit AS u
    WHERE u.ParentOrganizationalUnit IS NULL
    UNION ALL
-- Recursive member definition
    SELECT          
        u.ID as ID,
        u.ParentOrganizationalUnit as ParentID, 
        r.DepCode as  DepCode,
        ISNULL(r.DivCode,u.Division_Code) as DivCode
    FROM dbo.OrganizationalUnit AS u
    INNER JOIN CTE_RecursiveOU AS r
        ON u.ParentOrganizationalUnit = r.ID
)
-- Statement that executes the CTE
SELECT  
    p.ID as PersonID, 
    c.ID as OrganizationalUnitID,
    c.DepCode as Department_Code, 
    c.DivCode as Division_Code,
    p.FirstName,
    p.LastName
FROM CTE_RecursiveOU AS c
INNER JOIN dbo.Person AS p
    ON p.OrganizationalUnitID = c.ID;

GO