Let $ A,B \in M_{n\times n}(\mathbb{F}) $ be matrices such
$ \det\left(A+X\right)=\det\left(B+X\right) $ for any $ X\in M_{n\times n}\left(\mathbb{F}\right) $.
Prove that $ A=B $.
My idea is to assume by contradiction that $ A \neq B $ and therefore we can find $ X $ such that $ \det\left(A+X\right)\neq\det\left(B+X\right) $. But this is just intuitive idea, I dont know how to find this $ X $ in order to prove the what I claim.
I'll be glad for some help with finding such $ X $ that would satisfy the idea.
Thanks in advance.