The setting of the two angles for a polar mount has long been a problem.  My method for working out the main motor axis angle and the small downward tilt angle for the dish has always been approximate.

Telmo Ghiorzi has published a proper mathematical solution, complete with a nice YouTube video. Well done Telmo!.

See: https://www.ghiorzi.org/satelite.htm
wxw
Best regards Eric.