splitting of screen areas and retrieving the active area with python
Your sample code is not actually changing any area to a text editor. At the end of your code you are comparing to the string 'TEXT_EDITOR' not assigning. While you go through the areas you won't find a match to final_width as you are setting final_width to 1/3 of the width of the active area after the split, you would need to calculate the width before the split to have a chance of matching it.

When splitting an area we don't actually get a reference to the new area. One solution I can think of is to copy the list of areas, split the current area and then find the area that didn't exist to start with, this leads to the following demo operator to split the view and change the new area to a text editor.

class SplitArea(bpy.types.Operator):
    """Split area to include a text editor"""
    bl_idname = "screen.split_area"
    bl_label = "Split area"

    def execute(self, context):
        start_areas = context.screen.areas[:]
        bpy.ops.screen.area_split(direction='VERTICAL', factor=0.3)
        for area in context.screen.areas:
            if area not in start_areas:
                area.type = 'TEXT_EDITOR'
        return {'FINISHED'}