Relation formula between fork length change to headtube angle and bottom bracket height As we know, changing the fork length will change bike geometry a bit. For example, increasing fork travel by 10 cm will make the headangle slacker and raise the bottom bracket. I consider to increase fork travel on my bike by 20 mm, and to fix the increase in bb height with some headangle changing headset (like Cane Creek angleset). While I don't mind my bike to be slacker (actualy it's one of the goals of this modification), I do want my BB stay on the same height. Is there any formula we can develop to understand how would a change in fork length influences the headangle, and how the headangle influences the BB height?
This isn't a formula for you so maybe not the answer you're looking for, but it gets tricky because a fork isn't just a straight line; because it has offset it's kind of like a triangle itself for the purpose of doing the exact math here.

The thing most people who care about this question would do in practice is model the frame's fixed points in a 2d CAD program, model the forks in question (remembering that to do so you're making a right triangle where the axle to crown dimension is the hypotenuse, the offset dimension is one leg, and the other leg is an unknown length that can be solved for or figured out automatically in CAD), then plug each fork in to the frame model such that the unknown leg is in line with the head tube, and then pivot the whole thing around the point of the rear axle until the front axle snaps to being in plane with the rear. Then you can see the resultant head angles and BB heights easily. You can also easily see what angle changes at the headset would give you. There are many free 2d CAD programs that can do all this.