The first だと is actually two words, だ ("is", the copula) and a conditional-と. That is, ~だと means "if [something] is ~...". See Differences among -たら, なら, -と, -んだったら, -ば, etc and How Conditionals Work in Japanese: …と, …ば, …たら, and …なら.
The first half of the sentence can be broken down like this:
- 興味がある
to be interested (more literally, "you have an interest" or "there is an interest")
- 興味のある事
something you are interested in
(a relative clause with ga-no conversion)
- 興味のある事だ
(That) is something you are interested in.
- 興味のある事だと、...
If that is something you are interested in, ...
The second と is part of the ~ようと(する) construction, which means "to try to ~". See Volitional + と + Verb and What is the difference between "verb+て+みる" and "verb+(よ)う+とする"?. (と by itself is a marker for the content of an action, but you have to memorize -ようと as a set phrase first.) Thus the last half of the sentence means:
- ...あなたは一生懸命に理解しようと努めるでしょう。
...you will strive hard trying to understand it.
...you will strive hard in order to understand it.