Draw a symmetrical thingy, the calculations are then simple. I’ll let you figure out on your own what calculation is connected with what geometry:
sqrt(242+72) = 25
25 + 7 = 32
sqrt(322+242)=40
40/2=20
x = sqrt(252-202)=15
Have a look at loops.video, I think the ambition is for it to be an Activity Pub tiktok clone
https://zadzmo.org/code/nepenthes/