Field of View – How to find the horizontal and vertical FOV according to the image sensor resolution and focal length?

I have a camera with an image sensor of 1280 pixels x 1024 pixels with a physical resolution of 15 pixels / mm and a focal length of 50 mm. If I want to find the horizontal and vertical field of view in degrees, is this the correct method?

1280pixels / (15pixels / mm) = 85.33mm

1024pixels / (15pixels / mm) = 68.27mm

Horizontal FOV = 2 * arctan * (h / (2 * f))

Vertical FOV = 2 * arctan * (v / (2 * f))

80.9 ° = 2 * arctan * (85.33 / (2 * 50))

68.7 ° = 2 * arctan * (68.27 / (2 * 50))

I've also heard that the best solution is to use similar triangles with the physical resolution and the size of the sensor, but I do not know how to proceed.