How to get the value of face area using python
You can use bmesh to do that.

The code is fully commented below.

Using mesh triangulation

The only non intuitive part about bmesh and uv access is you need to get it using face loops.

Face loops are elements that can be indexed by the corresponding bmesh loops layer so that you can get the corresponding value in the loop (last line in the code before the print).

Note also that uv 2D coordinates are converted to a 3D vector so that tri_area function can work. This is a facility. You may want to write a more specific calculation for 2D tri area.

import bpy
import bmesh
from mathutils import Vector

# 3D tri area ABC is half the length of AB cross product AC 
def tri_area( co1, co2, co3 ):
    return (co2 - co1).cross( co3 - co1 ).length / 2.0

# Get the object
obj = bpy.context.object

# Construct bmesh
bm = bmesh.new()
bm.from_mesh( obj.data )

# Triangulate it so that we can calculate tri areas
bmesh.ops.triangulate( bm, faces = bm.faces )

# Ensure faces access
bm.faces.ensure_lookup_table()

# Get the uv map
uv_loop = bm.loops.layers.uv['UVMap']

# enumerate the faces
for face in bm.faces:
    # Get the face area (can also be 'face.calc_area()')
    face_area = tri_area( *(v.co for v in face.verts) )
    # Get corresponding uv area
    uv_area = tri_area( *(Vector( (*l[uv_loop].uv, 0) ) for l in face.loops) )
    print( face.index, face_area, uv_area )


Using triangulation on the fly

The interest is to have the final result at the polygon level so that areas can be directly compared to the mesh as it is.

The principle is nearly the same but we use bm.calc_loop_triangles() which gives us several loops of tris each referencing the initial faces.

As the areas for each face will be obtain by part (one tri at a time), we use a dictionary to cumulate the results (nothing gives a guaranty that each face is cut continuously in the resulting loop).

import bpy
import bmesh
from mathutils import Vector

# 3D tri area ABC is half the length of AB cross product AC 
def tri_area( co1, co2, co3 ):
    return (co2 - co1).cross( co3 - co1 ).length / 2.0

# Get the object
obj = bpy.context.object

# Construct bmesh
bm = bmesh.new()
bm.from_mesh( obj.data )

# Ensure faces access
bm.faces.ensure_lookup_table()

# Triangulate it so that we can calculate tri areas
triangle_loops = bm.calc_loop_triangles()

# Get the uv map
uv_loop = bm.loops.layers.uv['UVMap']

# Initialize face entries
areas = {face: (0.0, 0.0) for face in bm.faces} 

# enumerate the loops
for loop in triangle_loops:
    # Get the face
    face = loop[0].face
    # Get current areas
    face_area, uv_area = areas[face]
    # Add tri surface area
    face_area += tri_area( *(l.vert.co for l in loop) )
    # Add corresponding uv surface area
    uv_area += tri_area( *(Vector( (*l[uv_loop].uv, 0) ) for l in loop) )
    # Set the result in the dictionary
    areas[face] = (face_area, uv_area)

# Print results
for face in areas.keys():
    face_area, uv_area = areas[face]
    print( face.index, face_area, uv_area )


Note: triangulation calculation is not trivial and several algorithms may give different results, so for coherency in all cases we need to ask Blender apis how the triangulation must be done.