This is a very interesting question. Inkscape transform (or transform in computer graphics) can be quite complicated. This webpage has some good information on how transform works in Inkscape extensions.
https://inkscapetutorial.org/transforms.html
For your specific example, the direct answer is that Inkscape system extension (after version 1.0) has a Transform class (in transforms.py module), which has a method apply_to_point that can calculate the absolute coordinates.
More specifically, the following extension (inx and py files, under menu item Extension -> Custom -> Transform Element 2) draws the rectangle in your example with the Rectangle class, calculates the 4 corners with apply_to_point method, draws a path with those 4 points. The result two rectangles overlap each other, so we know the calculation is correct.
Code in transform2.inx file
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
<name>Transform Element 2</name>
<id>user.transform2</id>
<effect>
<object-type>all</object-type>
<effects-menu>
<submenu name="Custom"/>
</effects-menu>
</effect>
<script>
<command location="inx" interpreter="python">transform2.py</command>
</script>
</inkscape-extension>
Code in transform2.py file
import inkex
from inkex import Rectangle, Transform
from inkex import Vector2d
class NewElement(inkex.GenerateExtension):
container_label = 'transform'
container_layer = True
def generate(self):
self.style = {'fill' : 'none', 'stroke' : '#000000',
'stroke-width' : self.svg.unittouu('2px')}
self.style_red = {'fill' : 'none', 'stroke' : '#FF0000',
'stroke-width' : self.svg.unittouu('.5px')}
rects = self.add_rect()
for r in rects:
yield r
def add_rect(self):
rect = Rectangle.new(15, 5, 20, 5)
rect.style = self.style
tr = Transform('rotate(45)')
rect.transform = tr
el = rect
pt_top_left = tr.apply_to_point(Vector2d(el.left, el.top))
pt_top_right = tr.apply_to_point(Vector2d(el.right, el.top))
pt_right_bottom = tr.apply_to_point(Vector2d(el.right, el.bottom))
pt_left_bottom = tr.apply_to_point(Vector2d(el.left, el.bottom))
path = inkex.PathElement()
path.update(**{
'style': self.style_red,
'inkscape:label': 'redline',
'd': 'M ' + str(pt_top_left.x) + ',' + str(pt_top_left.y) +
' L ' + str(pt_top_right.x) + ',' + str(pt_top_right.y) +
' L ' + str(pt_right_bottom.x) + ',' + str(pt_right_bottom.y) +
' L ' + str(pt_left_bottom.x) + ',' + str(pt_left_bottom.y) +
' z'})
return [rect, path]
if __name__ == '__main__':
NewElement().run()
Here is the result of the extension run:

Furthermore, the simpletransform.py documentation you referenced in your post is written for Inkscape System Extension before version 1.0. The code is written with Python 2.X version. Even though you can find a copy of the file that comes with Inkscape 0.92.X, you will need to spend time to understand the code and rewrite it to be Python 3 compatible, and then you can use it in your program. It is not really recommended for anyone to do that.
As for Inkscape extension units, this webpage also has some good information on this topic.
https://inkscapetutorial.org/units-and-coordinate-systems.html