import math
def area(s,n):
a = s/(2* math.tan((math.pi/n)))
b = (n*s*a)/2
return b
area(2, 5)
#>>> 6.881909602355868
def area(s,n):
a = s/2* math.tan((math.pi/n))
b = (n*s*a)/2
return b
area(2, 5)
#>>> 3.6327126400268046
Really though, don't use single letter names. Making things unreadable does nobody any good.
If your mathematics doesn't make semantic sense, rewrite it so that it does. Your confusion is a testament to this.